Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { ApolloServer, gql } from 'apollo-server'
- const typeDefs = gql`
- type Program {
- id: ID!
- title: String!
- description: String
- poster(size: String): String
- characters: [String]
- episodeDuration: Int
- }
- type Query {
- program(id: ID!): Program
- }
- `
- const resolvers = {
- Query: {
- program: () => ({})
- }
- }
- const server = new ApolloServer({ typeDefs, resolvers })
- server.listen().then(({ url }) => { console.log(`🚀 Server ready at ${url}`) })
Add Comment
Please, Sign In to add comment