Created
May 1, 2018 19:45
-
-
Save afreeland/1f3ecb594be5b39539cb2db9445209e9 to your computer and use it in GitHub Desktop.
GraphQL: Enum Sample
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
import { | |
GraphQLEnumType, | |
} from 'graphql'; | |
var recentTypes = new GraphQLEnumType({ | |
name: 'recentTypess', | |
values: { | |
// The values are going to be used in the actual redis key itself | |
// i.e. analytics => recent:analytics:username | |
"Analytics" : { value: "analytics" }, | |
"KPI": { value: "kpi" } | |
} | |
}) | |
export default recentTypes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment