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

[GraphQL over WS] Allow null payloads #243

Merged
merged 1 commit into from
Mar 6, 2023
Merged

[GraphQL over WS] Allow null payloads #243

merged 1 commit into from
Mar 6, 2023

Conversation

enisdenjo
Copy link
Member

enisdenjo/graphql-ws#456

Original thinking was to support keeping the message size small by completely omitting the payload if nullish. But, that was an unnecessary limiting optimization.

Furthermore, allowing null values also keeps the spec more in line with the GraphQL over HTTP spec.

Specifying null in JSON (or equivalent values in other formats) as values for optional request parameters is equivalent to not specifying them at all.

GraphQL over HTTP spec

@enisdenjo enisdenjo merged commit 7fd6c72 into main Mar 6, 2023
@enisdenjo enisdenjo deleted the ws-null-payload branch March 6, 2023 08:06
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