Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import { gql } from 'apollo-server-express';
  2.  
  3. export const typeDef = gql`
  4. type Movie {
  5. id: ID!
  6. title: String!
  7. price: Float
  8. status: STATUS!
  9. stars: [String]
  10. }
  11.  
  12. enum STATUS {
  13. AVAILABLE
  14. RENTED
  15. UNDER_MAINTENANCE
  16. OUT_OF_CATALOG
  17. }
  18. `;
  19.  
  20. export const resolvers = {
  21. Movie: {
  22. id: ({ _id }) => _id,
  23. },
  24. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement