Skip to content

Instantly share code, notes, and snippets.

# 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!
const resolvers = {
mutation: {
submitReviews: async (parent, args, ctx, info) {
return ctx.db.mutation.createProduct(
{
data: {
product_id: args.product_id,
country: args.country,
feed: {
@kimiiz55
kimiiz55 / stateValueToVariables .js
Created February 24, 2018 17:00
send state value to variables
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);