Skip to content

Commit 2799074

Browse files
tekacstimsuchanek
authored andcommitted
Correctly use cookies when fetching schema (#546)
This implementation currently fails to send cookies along with a request (even though that was intended). This is because `credentials: include` is included in the list of headers rather than being passed as an option. Fixes #505
1 parent 77b206a commit 2799074

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/graphql-playground-react/src/components/Playground/SchemaFetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ export class SchemaFetcher {
2828
): Promise<{ schema: GraphQLSchema; tracingSupported: boolean } | null> {
2929
const response = await fetch(endpoint, {
3030
method: 'post',
31+
credentials: 'include',
3132
headers: {
3233
'Content-Type': 'application/json',
3334
'X-Apollo-Tracing': '1',
34-
credentials: 'include',
3535
...headers,
3636
},
3737
body: JSON.stringify({ query: introspectionQuery }),

0 commit comments

Comments
 (0)