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

Conversation

@rakeshkky
Copy link
Member

Description

The issue came from the recent refactor of internal types of Select modules. Any of existing test cases didn't catch it because

  1. The query need to be requested as non-admin role
  2. The object relationship whose permission limit defined should be queried in table selection set and be present in order by clause
query topic {
  topic (order_by: { category: {importance: desc}}) {
      {
       id
       category {
           id
      }
  }
}

Cause: In generated SQL, sub queries for object relationships from same table are grouped together. Unfortunately, this was not happening for object relationships present in order by clause and selection set if any permission limit set. The permission limit was considered into the identifier and hence both order by and selection set object relationship fields are treated different.

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.

No changelog required since the bug doesn't exist in previous stable releases.

Affected components

  • Server
  • Tests

Related Issues

Solution and Design

Refactor object relationship types without considering the permission limits.

Steps to test and verify

Limitations, known bugs & workarounds

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 self-assigned this Jun 23, 2020
@rakeshkky rakeshkky changed the title fix postgres error when querying object relationship in fields and in order by clause (fix #5148) fix postgres error when querying object relationship in fields and with in order by clause (fix #5148) Jun 23, 2020
@rakeshkky rakeshkky requested review from 0x777 and tirumaraiselvan and removed request for tirumaraiselvan June 23, 2020 08:00
@netlify
Copy link

netlify bot commented Jun 23, 2020

Deploy preview for hasura-docs ready!

Built with commit 148edf3

https://deploy-preview-5177--hasura-docs.netlify.app

@hasura-bot
Copy link
Contributor

Review app for commit 1d8787d deployed to Heroku: https://hge-ci-pull-5177.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5177-1d8787df

@rakeshkky rakeshkky marked this pull request as ready for review June 23, 2020 08:59
@hasura-bot
Copy link
Contributor

Review app for commit 148edf3 deployed to Heroku: https://hge-ci-pull-5177.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5177-148edf32

@hasura-bot
Copy link
Contributor

Review app for commit 943be5c deployed to Heroku: https://hge-ci-pull-5177.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5177-943be5cf

@hasura-bot
Copy link
Contributor

Review app for commit c05d3c6 deployed to Heroku: https://hge-ci-pull-5177.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5177-c05d3c61

@hasura-bot
Copy link
Contributor

Review app for commit 17b5fec deployed to Heroku: https://hge-ci-pull-5177.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5177-17b5fecb

@hasura-bot
Copy link
Contributor

Review app for commit 47536d1 deployed to Heroku: https://hge-ci-pull-5177.herokuapp.com
Docker image for server: hasura/graphql-engine:pull5177-47536d18

@tirumaraiselvan tirumaraiselvan merged commit 8b49f47 into hasura:master Jun 25, 2020
@hasura-bot
Copy link
Contributor

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

rakeshkky added a commit to lexi-lambda/graphql-engine that referenced this pull request Jul 20, 2020
…ssion limit, fix hasura#5148 (hasura#5177)

Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
stevefan1999-personal pushed a commit to stevefan1999-personal/graphql-engine that referenced this pull request Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants