Skip to content

Commit fc3e245

Browse files
author
Fabian Breitkreutz
committed
feat(createGatewayRuntime): expose renderGraphiQL option to pass on to yoga
1 parent 62eb4e4 commit fc3e245

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.changeset/angry-walls-provide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-hive/gateway-runtime': minor
3+
---
4+
5+
Introducing `renderGraphiQL` feature to provide GraphiQL without a CDN involved

packages/runtime/src/createGatewayRuntime.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,7 @@ export function createGatewayRuntime<
11911191
},
11921192
cors: config.cors,
11931193
graphiql: graphiqlOptionsOrFactory,
1194+
renderGraphiQL: config.renderGraphiQL,
11941195
batching: config.batching,
11951196
graphqlEndpoint: config.graphqlEndpoint,
11961197
maskedErrors: config.maskedErrors,

packages/runtime/src/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ interface GatewayConfigBase<TContext extends Record<string, any>> {
447447
* Show, hide or configure GraphiQL.
448448
*/
449449
graphiql?: YogaServerOptions<unknown, GatewayContext & TContext>['graphiql'];
450+
/**
451+
* Use GraphiQL provided by local installation.
452+
*/
453+
renderGraphiQL?: YogaServerOptions<unknown, GatewayContext & TContext>['renderGraphiQL'];
450454
/**
451455
* Whether the landing page should be shown.
452456
*/

0 commit comments

Comments
 (0)