Last active
July 3, 2016 23:16
-
-
Save chuck0523/2194d2984a7bc0f33b8383d5085fb718 to your computer and use it in GitHub Desktop.
This file contains 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
var jobType = new GraphQLObjectType({ | |
name: 'Job', | |
description: 'A job', | |
fields: () => ({ | |
id: globalIdField('Job'), | |
name: { | |
type: GraphQLString, | |
description: 'The name of the job', | |
resolve: (job) => job.name, | |
}, | |
salary: { | |
type: GraphQLInt, | |
description: 'The salary of the job', | |
resolve: (job) => job.salary, | |
}, | |
location: { | |
type: GraphQLString, | |
description: 'The place of the job', | |
resolve: (job) => job.location | |
}, | |
detail: { | |
type: GraphQLString, | |
description: 'The detail explanation of the job', | |
resolve: (job) => job.detail | |
}, | |
hasApplied: { | |
type: GraphQLBoolean, | |
description: 'If the user applied for this job or not', | |
resolve: (job) => job.hasApplied | |
} | |
}), | |
interfaces: [nodeInterface], | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment