-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatible with Apollo Server 2.0 #16
Comments
It appears that you can pass the schema in as an option to the ApolloServer constructor: https://www.apollographql.com/docs/apollo-server/api/apollo-server/#constructoroptions-apolloserver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In version 2.0,
// Type definitions define the "shape" of your data and specify // which ways the data can be fetched from the GraphQL server. const typeDefs = gql
type Book {
title: String
author: String
}
type Query {
books: [Book]
}
`;
// Resolvers define the technique for fetching the types in the
// schema. We'll retrieve books from the "books" array above.
const resolvers = {
Query: {
books: () => books,
},
};
// In the most basic sense, the ApolloServer can be started
// by passing type definitions (typeDefs) and the resolvers
// responsible for fetching the data for those types.
const server = new ApolloServer({ typeDefs, resolvers });`
How does one use the joinMonsterAdapt(schema, { } in version 2. The parameter: schema no longer exists because makeExecutableSchema() is no longer used/required?
The text was updated successfully, but these errors were encountered: