Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
Updates for graphql-js v14.x
Browse files Browse the repository at this point in the history
Also update other project dev-dependencies
  • Loading branch information
johnymontana committed Dec 4, 2018
1 parent 4b4737b commit 862553a
Show file tree
Hide file tree
Showing 4 changed files with 1,872 additions and 3,793 deletions.
8 changes: 4 additions & 4 deletions example/apollo-server/movies-middleware.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { augmentSchema } from '../../src/index';
import { makeAugmentedSchema } from '../../src/index';
import { ApolloServer } from 'apollo-server-express';
import express from 'express';
import bodyParser from 'body-parser';
import { makeExecutableSchema } from 'apollo-server';
import { v1 as neo4j } from 'neo4j-driver';
import { typeDefs, resolvers } from './movies-schema';

const schema = makeExecutableSchema({
const schema = makeAugmentedSchema({
typeDefs,
resolvers,
resolverValidationOptions: {
Expand All @@ -15,7 +15,7 @@ const schema = makeExecutableSchema({
});

// Add auto-generated mutations
const augmentedSchema = augmentSchema(schema);
//const augmentedSchema = augmentSchema(schema);

const driver = neo4j.driver(
process.env.NEO4J_URI || 'bolt://localhost:7687',
Expand All @@ -36,7 +36,7 @@ const checkErrorHeaderMiddleware = async (req, res, next) => {
app.use('*', checkErrorHeaderMiddleware);

const server = new ApolloServer({
schema: augmentedSchema,
schema,
// inject the request object into the context to support middleware
// inject the Neo4j driver instance to handle database call
context: ({ req }) => {
Expand Down
8 changes: 4 additions & 4 deletions example/apollo-server/movies.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { augmentSchema } from '../../src/index';
import { augmentTypeDefs, augmentSchema } from '../../src/index';
import { ApolloServer, gql, makeExecutableSchema } from 'apollo-server';
import { v1 as neo4j } from 'neo4j-driver';
import { typeDefs, resolvers } from './movies-schema';

const schema = makeExecutableSchema({
typeDefs,
resolvers,
typeDefs: augmentTypeDefs(typeDefs),
resolverValidationOptions: {
requireResolversForResolveType: false
}
},
resolvers
});

// Add auto-generated mutations
Expand Down
Loading

0 comments on commit 862553a

Please sign in to comment.