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 DateTime, CartItemSubscriptionPayload, ShippingInfoSubscriptionPayload, SupplierProductSubscriptionPayload from "./generated/prisma.graphql" | |
scalar Upload | |
type Query { | |
me: User | |
file(id: ID!): File | |
files: [File!]! | |
mainCategories: [MainCategory!]! | |
getAgentFacebookPages: [FacebookPagePayload!]! | |
supplierProduct(id: ID!): SupplierProduct! |
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 resolvers = { | |
mutation: { | |
submitReviews: async (parent, args, ctx, info) { | |
return ctx.db.mutation.createProduct( | |
{ | |
data: { | |
product_id: args.product_id, | |
country: args.country, | |
feed: { |
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
createTeamWork = () => { | |
this.props.mutate({ | |
variables: { | |
name: this.state.name, | |
} | |
}) | |
.then(({ data }) => { | |
console.log(‘got data’, data); | |
}).catch((error) => { | |
console.log(‘there was an error sending the query’, error); |