Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Mesh to enable global object identification support #2155

Open
ntziolis opened this issue May 16, 2021 · 0 comments
Open

Use Mesh to enable global object identification support #2155

ntziolis opened this issue May 16, 2021 · 0 comments

Comments

@ntziolis
Copy link
Contributor

ntziolis commented May 16, 2021

Being able to leverage global object identification can be extremely helpful in reducing complexity and improve DRY on the client. the usefulness increases with multi source setups.

Implementing this is not always possible however:

  • Limited control of downstream sources (especially when they are third party) prevents ensuring global uniqueness of keys
  • Even with full control of downstream sources it might not always be feasible to rebuild them to support global unique ids
  • Even with only a single source, it might not even support unique ids across types (auto increment int ids etc.)

Describe the solution you'd like

  • Extend schema to comply with the global object identification spec
  • Build resolver that ensures that returned ids are unique across sources as well as within a sources
    • one option would be to include the type name (post transforms) as a prefix for any id the downstream source provides
    • since types returned by mesh are unique this would ensure unique ids across data sources
  • Extend configuration to support configuration of
    • which types are supported
      • while the default should be all
      • a source might not support retrieving specific objects for a certain types
    • ability to specify the query to be used to retrieve a single object
      • this should support default on root and on source level
      • as well as specify it on a per type basis
    • I created more generic feature request to allow argument standardization Argument standardization #2156
      • if this would exist it would ensure uniformity of querying single objects across apis already
      • hence remove the necessity for additional configuration as part of the global object identification transform
      • assuming the argument standardization transform would always need to be used in tandem the global object identification
@theguild-bot theguild-bot mentioned this issue Aug 11, 2022
@theguild-bot theguild-bot mentioned this issue Sep 28, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
klippx pushed a commit to klippx/graphql-mesh that referenced this issue Oct 9, 2024
…2155)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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

No branches or pull requests

1 participant