You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You no longer need to import makeExecutableSchema from graphql-tools.
You should pass in typeDefs and resolvers as parameters to an instance of Apollo Server.
// 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:
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: