Guest User

Untitled

a guest
Dec 10th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import { ApolloServer, gql } from 'apollo-server'
  2.  
  3. const typeDefs = gql`
  4. type Program {
  5. id: ID!
  6. title: String!
  7. description: String
  8. poster(size: String): String
  9. characters: [String]
  10. episodeDuration: Int
  11. }
  12.  
  13. type Query {
  14. program(id: ID!): Program
  15. }
  16. `
  17.  
  18. const resolvers = {
  19. Query: {
  20. program: () => ({})
  21. }
  22. }
  23.  
  24. const server = new ApolloServer({ typeDefs, resolvers })
  25.  
  26. server.listen().then(({ url }) => { console.log(`🚀 Server ready at ${url}`) })
Add Comment
Please, Sign In to add comment