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

fix: precompute schemahash #301

Merged
merged 3 commits into from
Apr 30, 2024
Merged

fix: precompute schemahash #301

merged 3 commits into from
Apr 30, 2024

Conversation

danstarns
Copy link
Member

@danstarns danstarns commented Apr 30, 2024

This PR exposes the schema hash when you use traceSchema so that you don't need to recompute it with each request.

const tracedScema = traceSchema({
  schema,
  adapter: // <-- See Adapters
});

const myServer = new GraphQLServerFooBar({
  schema,
  context: {
    GraphQLDebuggerContext: new GraphQLDebuggerContext({ schema: tracedSchema.schema, schemaHash: tracedSchema.schemaHash }),
  },
});

@danstarns
Copy link
Member Author

danstarns commented Apr 30, 2024

@danstarns danstarns merged commit 4024553 into main Apr 30, 2024
20 checks passed
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.

None yet

1 participant