-
-
Save uno-de-piera/e92c9cfae2f7de3d66cc05a95b5c6898 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
import { API, graphqlOperation } from "aws-amplify"; | |
const listEnumValues = `query ListEnumValues($enum: String!) { | |
enum: __type(name: $enum) { | |
enumValues { | |
name | |
} | |
} | |
}`; | |
export default class GraphQLHelper { | |
async getEnum() { | |
const { data } = await API.graphql( | |
graphqlOperation(listEnumValues, { enum: "FileType" }) | |
); | |
return data; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment