Created
April 10, 2016 03:52
-
-
Save clayallsopp/c7db24bf7df87bbdd6c219e24db355d9 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
const UserType = new GraphQLObjectType({ | |
name : 'User', | |
interfaces: [SearchableType], | |
fields : { | |
username : { | |
type : GraphQLString | |
}, | |
searchPreviewText : { | |
type : GraphQLString, | |
resolve(data) { | |
return `(user) ${data.username}`; | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment