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

Conversation

@codingkarthik
Copy link
Contributor

@codingkarthik codingkarthik commented Oct 6, 2020

Earlier, the graphql-engine just proxied the remote schema requests to the remote server without validation, the only validation that was done at the root level. This PR changes that behaviour by deeply parsing a query i.e validate every field and argument provided in a remote schema query

Description

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
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System
  • Tests
  • Other (list it)

Related Issues

Solution and Design

Steps to test and verify

Limitations, known bugs & workarounds

Server checklist

Catalog upgrade

Does this PR change Hasura Catalog version?

  • No
  • Yes
    • Updated docs with SQL for downgrading the catalog

Metadata

Does this PR add a new Metadata feature?

  • No
  • Yes
    • Does run_sql auto manages the new metadata through schema diffing?
      • Yes
      • Not required
    • Does run_sql auto manages the definitions of metadata on renaming?
      • Yes
      • Not required
    • Does export_metadata/replace_metadata supports the new metadata added?
      • Yes
      • Not required

GraphQL

  • No new GraphQL schema is generated
  • New GraphQL schema is being generated:
    • New types and typenames are correlated

Breaking changes

  • No Breaking changes

  • There are breaking changes:

    1. Metadata API

      Existing query types:

      • Modify args payload which is not backward compatible
      • Behavioural change of the API
      • Change in response JSON schema
      • Change in error code
    2. GraphQL API

      Schema Generation:

      • Change in any NamedType
      • Change in table field names

      Schema Resolve:-

      • Change in treatment of null value for any input fields
    3. Logging

      • Log JSON schema has changed
      • Log type names have changed

@netlify
Copy link

netlify bot commented Oct 6, 2020

Deploy preview for hasura-docs ready!

Built with commit 110475c

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

@codingkarthik codingkarthik linked an issue Oct 6, 2020 that may be closed by this pull request
@codingkarthik codingkarthik changed the title [WIP] Parse remote schema queries deeply Server: Validate remote schema queries Oct 7, 2020
@codingkarthik codingkarthik requested a review from abooij October 7, 2020 17:25
@codingkarthik codingkarthik marked this pull request as ready for review October 7, 2020 17:25
@codingkarthik codingkarthik requested a review from a team as a code owner October 7, 2020 17:25
@abooij abooij added the c/server Related to server label Oct 8, 2020
@codingkarthik codingkarthik requested a review from abooij October 12, 2020 09:11
Copy link
Contributor

@abooij abooij left a comment

Choose a reason for hiding this comment

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

Hi @codingkarthik, thanks for your improvements. The PR looks better. We're getting close, I think.

I am adding a few more items to discuss. It seems to me that this code will be playing an increasingly important role, and so I think it would be valuable if we go the extra mile with this PR.

Copy link
Contributor

@abooij abooij left a comment

Choose a reason for hiding this comment

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

Some minor code cleanups.

@codingkarthik codingkarthik requested a review from abooij October 12, 2020 12:42
Copy link
Contributor

@abooij abooij left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks for all the improvements, @codingkarthik!

@codingkarthik
Copy link
Contributor Author

Thank you so much @abooij for the review and for bearing with me :)

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.

changelog

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

Labels

c/server Related to server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validate remote schema requests

3 participants