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

[@kadena/graph] More GraphQL types extend Node, and use of Promise optimizations #1188

Merged
merged 6 commits into from
Nov 9, 2023

Conversation

MRVDH
Copy link
Contributor

@MRVDH MRVDH commented Nov 7, 2023

  • Use an ObjectRef instead of a SchemaType to define the Node.
  • Add an id option to build the unique identifier. Pothos will base64 encode it for you. Do not use parse as there is a bug in the pothos relay plugin which can cause the return of duplicate/incorrect data.
  • Add an isTypeOf function that checks if the incoming object is actually the type that is being described.
  • Add a loadOne function to support the node and nodes query. You don't need to add loadMany to support nodes, only if specific logic is required that differs from a loadOne.

Copy link

changeset-bot bot commented Nov 7, 2023

🦋 Changeset detected

Latest commit: 618c5f3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kadena/graph Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Nov 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
alpha-docs ⬜️ Ignored (Inspect) Visit Preview Nov 8, 2023 3:07pm
docs-storybook ⬜️ Ignored (Inspect) Visit Preview Nov 8, 2023 3:07pm
react-ui ⬜️ Ignored (Inspect) Visit Preview Nov 8, 2023 3:07pm
tools ⬜️ Ignored (Inspect) Visit Preview Nov 8, 2023 3:07pm

@MRVDH MRVDH changed the title [@kadena/graph] Objects extend Nodes, and use of Promise optimizations [@kadena/graph] More GraphQL types extend Node, and use of Promise optimizations Nov 8, 2023
@MRVDH MRVDH marked this pull request as ready for review November 8, 2023 15:01
@MRVDH MRVDH merged commit d58bce7 into main Nov 9, 2023
10 checks passed
@MRVDH MRVDH deleted the feat/graph/node-implementations-and-optimizations branch November 9, 2023 10:33
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.

2 participants