-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…utility (#1770) - support for `@defer` and `@stream` in `GraphiQL` itself on fetcher execution and when handling stream payloads - introduce `@graphiql/toolkit` for types and utilities used to compose `GraphiQL` and other related libraries - introduce `@graphiql/create-fetcher` to accept simplified parameters to generate a `fetcher` that covers the most commonly used `graphql-over-http` transport spec proposals. using `meros` for multipart http, and `graphql-ws` for websockets subscriptions. - use `graphql` and `graphql-express` `experimental-defer-stream` branch in development until it's merged - add cypress e2e tests for `@stream` in different scenarios - add some unit tests for `createGraphiQLFetcher`
- Loading branch information
Showing
59 changed files
with
1,868 additions
and
862 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,6 @@ lerna-debug.log | |
.yarnrc | ||
yarn-1.18.0.js | ||
*.orig | ||
|
||
# Local Netlify folder | ||
.netlify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
engine-strict=true | ||
access=public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* example using https://github.com/awslabs/aws-serverless-express */ | ||
const express = require('express'); | ||
const { graphqlHTTP } = require('express-graphql'); | ||
const awsServerlessExpress = require('aws-serverless-express'); | ||
const schema = require('../packages/graphiql/test/schema'); | ||
const cors = require('cors'); | ||
|
||
const binaryMimeTypes = [ | ||
'application/javascript', | ||
'application/json', | ||
'font/eot', | ||
'font/opentype', | ||
'font/otf', | ||
'image/jpeg', | ||
'image/png', | ||
'image/svg+xml', | ||
'text/css', | ||
'text/html', | ||
'text/javascript', | ||
'multipart/mixed', | ||
]; | ||
|
||
const app = express(); | ||
|
||
app.use(cors({ origin: '*' })); | ||
|
||
// Requests to /graphql redirect to / | ||
app.all('/graphql', (req, res) => res.redirect('/')); | ||
|
||
// Finally, serve up the GraphQL Schema itself | ||
app.use( | ||
'/', | ||
graphqlHTTP(() => ({ schema })), | ||
); | ||
|
||
const server = awsServerlessExpress.createServer(app, null, binaryMimeTypes); | ||
|
||
exports.handler = (event, context) => | ||
awsServerlessExpress.proxy(server, event, context); | ||
|
||
// // Server | ||
// app.post('/graphql', graphqlHTTP({ schema })); | ||
|
||
// // app.get('/graphql', graphQLMiddleware); | ||
// // Export Lambda handler | ||
|
||
// exports.handler = serverless(app, { | ||
// httpMethod: 'POST' | ||
// }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.