This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| users: { | |
| type: new GraphQLList(User), | |
| description: 'Netguru members', | |
| resolve: () => { | |
| return USER.find({}, (err, res) => { | |
| return res; | |
| }); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| GraphQLList, | |
| GraphQLObjectType, | |
| GraphQLSchema, | |
| GraphQLString, | |
| } from 'graphql'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const User = new GraphQLObjectType({ | |
| name: 'User', | |
| description: 'Represents user', | |
| fields: () => ({ | |
| _id: { type: GraphQLString }, | |
| firstName: { type: GraphQLString }, | |
| lastName: { type: GraphQLString }, | |
| role: { type: GraphQLString } | |
| }) | |
| }); |
NewerOlder