Skip to content

Commit

Permalink
Update HTTP Executor and add method and useGETForQueries to Graph…
Browse files Browse the repository at this point in the history
…iQL options
  • Loading branch information
ardatan committed Dec 7, 2023
1 parent 29b0b6e commit 1cbcb84
Show file tree
Hide file tree
Showing 4 changed files with 366 additions and 231 deletions.
6 changes: 6 additions & 0 deletions .changeset/mighty-actors-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'graphql-yoga': patch
'@graphql-yoga/graphiql': patch
---

Update HTTP Executor and add `method` and `useGETForQueries` to GraphiQL options
2 changes: 1 addition & 1 deletion packages/graphiql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dependencies": {
"@graphiql/plugin-explorer": "^0.1.4",
"@graphiql/toolkit": "0.8.4",
"@graphql-tools/url-loader": "8.0.0",
"@graphql-tools/url-loader": "8.0.1",
"graphiql": "2.0.7",
"graphql": "16.6.0",
"json-bigint-patch": "0.0.8",
Expand Down
8 changes: 8 additions & 0 deletions packages/graphql-yoga/src/plugins/use-graphiql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ export type GraphiQLOptions = {
* Extra headers you always want to pass with users' headers input
*/
additionalHeaders?: Record<string, string>;
/**
* HTTP method to use when querying the original schema.
*/
method?: 'GET' | 'POST';
/**
* Whether to use the GET HTTP method for queries when querying the original schema
*/
useGETForQueries?: boolean;
};

export type GraphiQLRendererOptions = {
Expand Down
Loading

0 comments on commit 1cbcb84

Please sign in to comment.