Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Last active August 16, 2019 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/e92c9cfae2f7de3d66cc05a95b5c6898 to your computer and use it in GitHub Desktop.
Save uno-de-piera/e92c9cfae2f7de3d66cc05a95b5c6898 to your computer and use it in GitHub Desktop.
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