From 2faab6a69780adfafa8bbb9e9bb1448ddfca9a6a Mon Sep 17 00:00:00 2001 From: Ali Rizwan Date: Sat, 2 Dec 2023 02:59:55 +0100 Subject: [PATCH] pushed new changes --- examples/sequelize-graphql-schema.spec.js | 7 +++++-- package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/sequelize-graphql-schema.spec.js b/examples/sequelize-graphql-schema.spec.js index 2090339..52bcae4 100644 --- a/examples/sequelize-graphql-schema.spec.js +++ b/examples/sequelize-graphql-schema.spec.js @@ -67,19 +67,22 @@ const { generateSchema } = require('../src/index')({ const app = express(); const models = require('./models'); +app.get('/', expressPlayground({ endpoint: '/' })); + app.all('/', async (req, res) => { const schema = await generateSchema(models, req); const handler = createHandler({ schema: new GraphQLSchema(schema), graphiql: true, + context: { + req + } }); handler(req, res); }); -app.get('/gql', expressPlayground({ endpoint: '/' })); - app.listen(3000, () => { // eslint-disable-next-line no-console console.log('RUNNING ON 3000'); diff --git a/package.json b/package.json index b70f47d..8df7fed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "graphcraft", - "version": "1.1.5", + "version": "1.2.1", "description": "Rapildy build and extend GraphQL API based on Sequelize models. This library helps you focus on business logic while taking care of GraphQL schema automatically.", "main": "src/index.js", "scripts": {