Skip to content

Instantly share code, notes, and snippets.

@BrentonCozby
Created June 17, 2017 21:19
Show Gist options
  • Save BrentonCozby/47e83ad6b6881a4c49b07bc39e616c6e to your computer and use it in GitHub Desktop.
Save BrentonCozby/47e83ad6b6881a4c49b07bc39e616c6e to your computer and use it in GitHub Desktop.
const addMutation = gql`
mutation addPost($title: String!, $description: String!, $image: String!, $ingredients: [String!]!, $instructions: [String!]!) {
createRecipe(title: $title, description: $description, image: $image, ingredients: $ingredients, instructions: $instructions) {
id
title
description
image
ingredients
instructions
}
}
`;
const PageWithMutation = graphql(addMutation, { name: "addPost" })(
CreateRecipe
);
export default PageWithMutation;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment