I have the following Apollo example:
const { ApolloServer, gql } = require('apollo-server');
const typeDefs = gql`
type Query {
hello: String
}
`;
const server = new ApolloServer({
typeDefs,
mocks: true,
});
server.listen().then(({ url }) => {
console.log(` Server ready at ${url}`)
});
I'm just not super sure what the gql thing is and how to pass it a string that I read from disk (my schema is too big to inline here). I tried following the definitions but it's a maze of abstraction that's hard to figure out.