-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix introspection faling when multiple actions defined with PG scalar types (fix #5166) #5173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix introspection faling when multiple actions defined with PG scalar types (fix #5166) #5173
Conversation
| , foldr addScalarToTyAgg mempty $ | ||
| pgScalars <> Set.fromList [PGJSON, PGTimeStampTZ, PGUUID] | ||
| , foldr addScalarToTyAgg mempty [PGJSON, PGTimeStampTZ, PGUUID] | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is causing the issue. The mkNewRoleState function initiates the state with empty RootFields and TyAgg with PG scalars reused and mandatory scalars for actions. This function is invoked only for the first action in the list (unfortunately) and remaining actions' reused PG scalars were not added to TyAgg. Hence the issue only exist if multiple actions are defined. The fix is to remove adding PG scalars in this function and add PG scalars to TyAgg explicitly for each action in accumulate functions.
|
Review app for commit a379bfc deployed to Heroku: https://hge-ci-pull-5173.herokuapp.com |
|
Review app for commit 29445f5 deployed to Heroku: https://hge-ci-pull-5173.herokuapp.com |
a5e4284 to
21123c7
Compare
21123c7 to
4a427ca
Compare
tirumaraiselvan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CL approved
|
Review app for commit 4a427ca deployed to Heroku: https://hge-ci-pull-5173.herokuapp.com |
0x777
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
codingkarthik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Review app for commit 583dd54 deployed to Heroku: https://hge-ci-pull-5173.herokuapp.com |
|
Review app https://hge-ci-pull-5173.herokuapp.com is deleted |
… PG scalar types (fix hasura#5166) (hasura#5173) Introspection query is failing with `type info not found for xxxx` error message if multiple actions are defined with reused PG scalars. The fix for the same.
… types (fix hasura#5166) (hasura#5173) Introspection query is failing with `type info not found for xxxx` error message if multiple actions are defined with reused PG scalars. The fix for the same.
Description
Introspection query is failing with
type info not found for xxxxerror message if multiple actions are defined with reused PG scalars. The PR fixes the same.Changelog
CHANGELOG.mdis updated with user-facing content relevant to this PR. If no changelog is required, then add theno-changelog-requiredlabel.Affected components
Related Issues
Fix #5166
Solution and Design
See the in line diff comment.
Steps to test and verify
Define more than one actions with PG scalars. The introspection query should go through and schema should be shown in the graphiql docs.
Limitations, known bugs & workarounds
NA
Server checklist
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
GraphQL
Breaking changes