这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@rakeshkky
Copy link
Member

@rakeshkky rakeshkky commented Jun 22, 2020

Description

Introspection query is failing with type info not found for xxxx error message if multiple actions are defined with reused PG scalars. The PR fixes the same.

Changelog

  • CHANGELOG.md is updated with user-facing content relevant to this PR. If no changelog is required, then add the no-changelog-required label.

Affected components

  • Server
  • Tests

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?

  • No
  • Yes

Metadata

Does this PR add a new Metadata feature?

  • No
  • Yes

GraphQL

  • No new GraphQL schema is generated
  • New GraphQL schema is being generated

Breaking changes

  • No Breaking changes
  • There are breaking changes

@rakeshkky rakeshkky added c/server Related to server c/actions Related to actions labels Jun 22, 2020
@rakeshkky rakeshkky self-assigned this Jun 22, 2020
, foldr addScalarToTyAgg mempty $
pgScalars <> Set.fromList [PGJSON, PGTimeStampTZ, PGUUID]
, foldr addScalarToTyAgg mempty [PGJSON, PGTimeStampTZ, PGUUID]
)
Copy link
Member Author

@rakeshkky rakeshkky Jun 22, 2020

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.

@hasura-bot
Copy link
Contributor

Review app for commit a379bfc deployed to Heroku: https://hge-ci-pull-5173.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5173-a379bfc1

@hasura-bot
Copy link
Contributor

Review app for commit 29445f5 deployed to Heroku: https://hge-ci-pull-5173.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5173-29445f51

@rakeshkky rakeshkky force-pushed the 5166-action-introspection-fix branch from a5e4284 to 21123c7 Compare June 23, 2020 06:57
@rakeshkky rakeshkky changed the title fix introspection faling if multiple actions using PG scalar types (fix #5166) fix introspection faling when multiple actions defined with PG scalar types (fix #5166) Jun 23, 2020
@rakeshkky rakeshkky force-pushed the 5166-action-introspection-fix branch from 21123c7 to 4a427ca Compare June 23, 2020 06:58
@rakeshkky rakeshkky marked this pull request as ready for review June 23, 2020 06:59
@rakeshkky rakeshkky requested a review from a team as a code owner June 23, 2020 06:59
Copy link
Contributor

@tirumaraiselvan tirumaraiselvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CL approved

@hasura-bot
Copy link
Contributor

Review app for commit 4a427ca deployed to Heroku: https://hge-ci-pull-5173.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5173-4a427cad

Copy link
Member

@0x777 0x777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@codingkarthik codingkarthik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hasura-bot
Copy link
Contributor

Review app for commit 583dd54 deployed to Heroku: https://hge-ci-pull-5173.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5173-583dd541

@rakeshkky rakeshkky merged commit ea23571 into hasura:master Jun 23, 2020
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-5173.herokuapp.com is deleted

rakeshkky added a commit to lexi-lambda/graphql-engine that referenced this pull request Jul 20, 2020
… 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.
stevefan1999-personal pushed a commit to stevefan1999-personal/graphql-engine that referenced this pull request Sep 12, 2020
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/actions Related to actions c/server Related to server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Actions causing introspection to break

5 participants