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

Conversation

@codingkarthik
Copy link
Contributor

@codingkarthik codingkarthik commented Sep 3, 2020

This PR introduces the concept of custom table identifiers. An identifier is an alias for a table. When a table is tracked with an identifier, the nodes generated for the table will be according to the identifier. The identifier can be useful to use when
tracking tables with non GraphQL compliant names or it can be useful if the nodes that are generated should not be dependent on the table name i.e when a table is tracked with an identifier and if the table has been renamed, the node names will not be changed due to the identifier.

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

fixes #3811

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:

      If a table has an identifier set, then the types and names are generated according to the identifier.

      Schema Resolve:-

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

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

LIMITATIONS:

To be able to track a table, the constraint names should be GraphQL compliant, otherwise the table cannot be tracked.

@netlify
Copy link

netlify bot commented Sep 3, 2020

Deploy preview for hasura-docs ready!

Built with commit f4f0d18

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

@codingkarthik codingkarthik force-pushed the custom-table-identifier branch from a0d60ac to 1f28be6 Compare September 4, 2020 06:21
@codingkarthik codingkarthik marked this pull request as ready for review September 4, 2020 12:11
@codingkarthik codingkarthik requested review from a team as code owners September 4, 2020 12:11
codingkarthik and others added 4 commits September 16, 2020 11:35
….rst

Co-authored-by: Marion Schleifer <marion@hasura.io>
….rst

Co-authored-by: Marion Schleifer <marion@hasura.io>
….rst

Co-authored-by: Marion Schleifer <marion@hasura.io>
….rst

Co-authored-by: Marion Schleifer <marion@hasura.io>
@codingkarthik codingkarthik changed the title server: customize tracking tables with an identifier server: customize tracking tables with a custom name Oct 29, 2020
@codingkarthik codingkarthik force-pushed the custom-table-identifier branch from 1475a5d to 8fc740d Compare October 29, 2020 07:17
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

@tirumaraiselvan tirumaraiselvan dismissed stale reviews from lexi-lambda and marionschleifer October 29, 2020 12:45

stale

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom GraphQL types for tables not conforming to GraphQL naming spec

5 participants