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

Conversation

@rakeshkky
Copy link
Member

@rakeshkky rakeshkky commented Oct 23, 2019

Description

  • Support computed fields for each of item in tables in export/import metadata
  • Add computed fields to cache before permissions, since permissions depend on computed fields availability
  • Add (explicitly) computed fields' function input arguments scalars to GraphQL schema
  • Remove the traces of computedCol.. names in the codebase.

Affected components

  • Server
  • Tests

Related Issues

Fix #3232, fix #3290

Solution and Design

  • Add computed_fields to each table in export_metadata and replace_metadata query API.
  • In buildSchemaCacheWithOptions function, move computed fields related code before permissions.
  • While generating the input object of args input field of computed fields, generate scalars for input argument fields and add them explicitly to scalar set.

Steps to test and verify

Limitations, known bugs & workarounds

@rakeshkky rakeshkky added c/server Related to server p/high candidate for being included in the upcoming sprint labels Oct 23, 2019
@rakeshkky rakeshkky self-assigned this Oct 23, 2019
@rakeshkky rakeshkky force-pushed the computed-field-metadata-export branch from 9893425 to cfd528f Compare October 23, 2019 10:35
@netlify
Copy link

netlify bot commented Oct 23, 2019

Deploy preview for hasura-docs ready!

Built with commit 9893425

https://deploy-preview-3211--hasura-docs.netlify.com

@netlify
Copy link

netlify bot commented Oct 23, 2019

Deploy preview for hasura-docs ready!

Built with commit b56063a

https://deploy-preview-3211--hasura-docs.netlify.com

@rakeshkky rakeshkky marked this pull request as ready for review October 23, 2019 10:46
@rakeshkky rakeshkky changed the title support computed fields in export/import metadata computed fields in export/import metadata & other fixes Oct 25, 2019
@hasura-bot
Copy link
Contributor

Review app for commit 55fb909 deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-55fb909e

-> Adds computed fields' function input arguments scalars thus fixes
   hasura#3232
-> In `buildSchemaCache`, adding computed fields done before permissions
   since permissions depend on computed fields availability
-> Rename all 'computedCol....' to 'computedField....'
@rakeshkky rakeshkky force-pushed the computed-field-metadata-export branch from 55fb909 to ac775dd Compare October 30, 2019 08:48
@rakeshkky rakeshkky changed the title computed fields in export/import metadata & other fixes computed fields in export/import metadata & other fixes/improvements Oct 30, 2019
-> Remove 'functionArgsWithoutTableArg'
-> drop table argument in input args sequence of 'ComputedFieldFunction'
@rakeshkky rakeshkky force-pushed the computed-field-metadata-export branch from ac775dd to 14be647 Compare October 30, 2019 08:52
@hasura-bot
Copy link
Contributor

Review app for commit 14be647 deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-14be6479

@hasura-bot
Copy link
Contributor

Review app for commit c776fe6 deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-c776fe6a

@hasura-bot
Copy link
Contributor

Review app for commit 21f5df3 deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-21f5df3b

Copy link
Contributor

@lexi-lambda lexi-lambda left a comment

Choose a reason for hiding this comment

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

This generally LGTM, but I’ve left a few small comments.

@rakeshkky rakeshkky changed the title computed fields in export/import metadata & other fixes/improvements computed fields in export/import metadata, other fixes and improvements Oct 31, 2019
@rakeshkky rakeshkky requested a review from lexi-lambda October 31, 2019 07:30
@hasura-bot
Copy link
Contributor

Review app for commit d3a5b60 deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-d3a5b60f

@hasura-bot
Copy link
Contributor

Review app for commit 68462ba deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-68462ba2

lexi-lambda
lexi-lambda previously approved these changes Nov 1, 2019
lexi-lambda
lexi-lambda previously approved these changes Nov 1, 2019
@hasura-bot
Copy link
Contributor

Review app for commit 80fdbe6 deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-80fdbe6c

Resolve Conflicts:
	server/src-lib/Hasura/RQL/DDL/Metadata.hs
	server/tests-py/queries/v1/metadata/export_metadata.yaml
…/graphql-engine into computed-field-metadata-export
@hasura-bot
Copy link
Contributor

Review app for commit bad1e6d deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-bad1e6d8

@hasura-bot
Copy link
Contributor

Review app for commit 3cad102 deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-3cad1024

@hasura-bot
Copy link
Contributor

Review app for commit 02356a6 deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-02356a6f

@hasura-bot
Copy link
Contributor

Review app for commit b56063a deployed to Heroku: https://hge-ci-pull-3211.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3211-b56063a7

@shahidhk shahidhk changed the title computed fields in export/import metadata, other fixes and improvements computed fields in export/import metadata, other fixes Nov 7, 2019
@shahidhk shahidhk merged commit 3888ceb into hasura:master Nov 7, 2019
@hasura-bot
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/server Related to server p/high candidate for being included in the upcoming sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

computed fields should be persisted via metadata After adding computed columns, GraphQL schema returns empty

4 participants