question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues with stream and defer in v 13

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Product

Hot Chocolate

Describe the bug

I have migrated to v13 and i am using react relay for the client and sending this request :

{"query":"query TodosQuery(\n $before: String\n $after: String\n $first: Int\n $last: Int\n) {\n ...TodosFragment\n}\n\nfragment TodosFragment on Query {\n todos(before: $before, after: $after, first: $first, last: $last) {\n ... @defer(label: \"TodosFragment$defer$List__todos$pageInfo\") {\n pageInfo {\n hasNextPage\n endCursor\n hasPreviousPage\n startCursor\n }\n }\n edges @stream(label: \"TodosFragment$stream$List__todos\", initial_count: 2) {\n node {\n title\n body\n id\n isCompleted\n __typename\n }\n cursor\n }\n }\n}\n","variables":{"before":null,"after":null,"first":2,"last":null}}

but the server response is like this :

{"errors":[{"message":"The specified operation kind is not allowed."}]}

on the playground im not getting this error btw.

<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
<PackageReference Include="HotChocolate.AspNetCore" Version="13.0.2" />
<PackageReference Include="HotChocolate.AspNetCore.Authorization" Version="13.0.2" />
<PackageReference Include="HotChocolate.Subscriptions.Redis" Version="13.0.2" />
<PackageReference Include="HotChocolate.Data.MongoDb" Version="13.0.2" />
<PackageReference Include="MongoDB.Driver" Version="2.19.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.10" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.24.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.24.0" />

Steps to reproduce

Relevant log output

No response

Additional Context?

No response

Version

13

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelstaibcommented, Feb 18, 2023

If you specify an accept other than Accept: */* you need to specify all the formats that you want to receive.

Accept: application/json and Accept: multipart/mixed;charset=utf-8 for instance.

0reactions
amirHosseinKhademiicommented, Feb 20, 2023

Thanks now its working

Read more comments on GitHub >

github_iconTop Results From Across the Web

Placeholder issue for feedback on `@defer` & `@stream ...
The client indicates it is capable of version 2. Accept: application/vnd.graphql.org+json;version=2. The client supports streaming responses.
Read more >
Using the @defer directive in Apollo Client
The @defer directive allows us to mark parts of the query that are not necessary for our app's initial render which will be...
Read more >
GraphQL's @defer and @stream Directives are overkill
The GraphQL directives @defer and @stream are a great way to incrementally load data, but they are a complex solution that can be...
Read more >
GraphQL won't solve your performance problems, but ...
Finally, as mentioned before, defer is driven by the client. They will be most aware of what use cases can be driven by...
Read more >
Defer and Stream Directives in GraphQL - YouTube
Defer and Stream Directives in GraphQL with Rob Richard, Sr Director, Front-End Engineering at 1stdibs, and Liliana Matos, Director, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found