https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# orm-help
  • m

    Martí Crespí

    03/04/2019, 8:33 AM
    Hi guys! Having these relations (a customer have N contracts and N billingAccounts), my prisma client generate a createCustomer mutation. But is possible to create only customer entity? In the mutation is requesting the relations as non nullable types..
    m
    • 2
    • 6
  • t

    Thidasa Pankaja

    03/04/2019, 11:12 AM
    Hi guys. having an issue with refetching a query after a mutation. I have a code structure like this
    Copy code
    <Query query={A}>
      <Mutation mutation={B}>
      <Mutation>
    <Query>
    What I want is refetch A query after B mutation has executed. So, how can I do this with Query and Mutation components ?
    j
    • 2
    • 5
  • d

    Dennis Martin Herbers

    03/04/2019, 12:18 PM
    hi everyone! does anyone have any example on how to implement file uploads with nexus-prisma? I am currently working on a new API (first time prisma user) and while most things work beautifully (using apollo server 2.0 instead of yoga though), I am not sure how to go on about doing file uploads with nexus
    j
    w
    • 3
    • 4
  • b

    bjswick33

    03/04/2019, 1:58 PM
    I have a small/quick question. Will SQL Server get a connector? Maybe using something like tedious? Was looking to implement a solution, but we are using SQL server and changing is not an option.
  • j

    John Smeeth

    03/04/2019, 2:30 PM
    hi all
  • j

    John Smeeth

    03/04/2019, 2:30 PM
    i have this server schema
  • j

    John Smeeth

    03/04/2019, 2:31 PM
    Copy code
    type Query {
      countries: [Country!]!
    }
    
    type Mutation {
      createCountry(input: CountryCreateInput!): Country
    }
    
    # input
    input CountryCreateInput {
      name: String!
      code: String!
    }
    
    scalar DateTime
    scalar Json
    
    type Country {
      name: String!
      code: String!
        images: [Json!]!
        createdAt: DateTime!
    }
  • j

    John Smeeth

    03/04/2019, 2:31 PM
    but when i run
    go run scripts/gqlgen.go
    got this error
  • j

    John Smeeth

    03/04/2019, 2:31 PM
    Copy code
    panic: Json was not found
    
    goroutine 1 [running]:
    ws/gland/vendor/github.com/99designs/gqlgen/codegen.(*builder).bindField.func1(0xc000243cb0, 0xc000b37960)
    	/Users/alex/go/src/ws/gland/vendor/github.com/99designs/gqlgen/codegen/field.go:81 +0xac
    ws/gland/vendor/github.com/99designs/gqlgen/codegen.(*builder).bindField(0xc000b37960, 0xc000115680, 0xc000243cb0, 0x16cc180, 0xc00010a160)
    	/Users/alex/go/src/ws/gland/vendor/github.com/99designs/gqlgen/codegen/field.go:168 +0xbd6
    ws/gland/vendor/github.com/99designs/gqlgen/codegen.(*builder).buildField(0xc000b37960, 0xc000115680, 0xc0003178f0, 0xc000243c00, 0x0, 0x0)
    	/Users/alex/go/src/ws/gland/vendor/github.com/99designs/gqlgen/codegen/field.go:64 +0x31d
    ws/gland/vendor/github.com/99designs/gqlgen/codegen.(*builder).buildObject(0xc000b37960, 0xc000f15ec0, 0x15ef4c0, 0x6, 0x0)
    	/Users/alex/go/src/ws/gland/vendor/github.com/99designs/gqlgen/codegen/object.go:72 +0x4d4
    ws/gland/vendor/github.com/99designs/gqlgen/codegen.BuildData(0xc0001be000, 0x16cca00, 0x1acd4a0, 0x0)
    	/Users/alex/go/src/ws/gland/vendor/github.com/99designs/gqlgen/codegen/data.go:76 +0x395
    ws/gland/vendor/github.com/99designs/gqlgen/api.Generate(0xc0001be000, 0x0, 0x0, 0x0, 0x0, 0x162fef8)
    	/Users/alex/go/src/ws/gland/vendor/github.com/99designs/gqlgen/api/generate.go:37 +0x22d
    ws/gland/vendor/github.com/99designs/gqlgen/cmd.glob..func1(0xc0000de6e0)
    	/Users/alex/go/src/ws/gland/vendor/github.com/99designs/gqlgen/cmd/gen.go:39 +0xa2
    ws/gland/vendor/github.com/urfave/cli.HandleAction(0x152f7a0, 0x16302f8, 0xc0000de6e0, 0xc000090b40, 0x0)
    	/Users/alex/go/src/ws/gland/vendor/github.com/urfave/cli/app.go:492 +0x7c
    ws/gland/vendor/github.com/urfave/cli.(*App).Run(0xc0000b8b60, 0xc0000b2000, 0x1, 0x1, 0x0, 0x0)
    	/Users/alex/go/src/ws/gland/vendor/github.com/urfave/cli/app.go:264 +0x57c
    ws/gland/vendor/github.com/99designs/gqlgen/cmd.Execute()
    	/Users/alex/go/src/ws/gland/vendor/github.com/99designs/gqlgen/cmd/root.go:40 +0x224
    main.main()
    	/Users/alex/go/src/ws/gland/scripts/gqlgen.go:8 +0x20
    exit status 2
  • j

    John Smeeth

    03/04/2019, 2:32 PM
    But when i commented using of
    scalar DateTime
    and
    scalar Json
    and in model's field. it works.
    l
    • 2
    • 4
  • j

    John Smeeth

    03/04/2019, 2:32 PM
    anybody pls help me. thanks
  • j

    John Smeeth

    03/04/2019, 2:33 PM
    I'm using prisma with golang
  • s

    Sam Slotsky

    03/04/2019, 2:49 PM
    Hey y'all 👋 I have what I hope is a quick/simple question. I'm going through a Prisma tutorial right now and I'm getting back some aggregate data that doesn't look right to me.
    n
    • 2
    • 4
  • s

    Sam Slotsky

    03/04/2019, 2:49 PM
    I have 2 users in my database, and you can see that
    hasNextPage
    is true, but I get back a
    count
    of 1
    h
    n
    • 3
    • 9
  • j

    jackgray

    03/04/2019, 3:44 PM
    I'm trying to use Jared Palmer's Razzle library for SSR in lieu of Next.js, but seems that I may not be able to with graphql-yoga. Has anyone out there tried this? Or had luck configuring Prisma with ApolloServer/apollo-server-express by any chance?
    z
    • 2
    • 10
  • s

    Slackbot

    03/04/2019, 4:03 PM
    This message was deleted.
    j
    • 2
    • 2
  • s

    Steve Mason

    03/04/2019, 6:27 PM
    Hey all! Looking for some help with ApolloServer and prisma subscriptions. https://prisma.slack.com/archives/CA491RJH0/p1551395467052400
  • r

    romseguy

    03/04/2019, 9:06 PM
    Hi, I'm getting CREATE_FAILED error following this tutorial at step 2.3 https://github.com/prisma/prisma/blob/master/docs/1.9/03-Tutorials2/06-Deploy-Prisma-Servers/05-AWS-Fargate.md
  • a

    Aaron Ullal

    03/04/2019, 10:19 PM
    Hi guys! Any news on this? https://www.prisma.io/forum/t/after-prisma-deploy-my-service-is-not-showing-up-in-the-console/6129/2 I cannot see my services deployed on heroku in the cloud dashboard 😥
    z
    • 2
    • 1
  • a

    Aaron Ullal

    03/04/2019, 10:19 PM
    Anyways just started using Prisma and it looks pretty sweet! Is anyone using it in production already?
  • i

    iago

    03/04/2019, 11:54 PM
    query:
    Copy code
    {
      subscriptions {
        stations {
          sections {
            name
          }
          loose {
            name
          }
        }
      }
    }
    dm:
    Copy code
    type Subscription {
      id: ID! @id
      stations: SubscriptionStations
      (...)
    }
    type SubscriptionStations @embedded {
      sections: [SubscriptionStationsSection!]!
      loose: [Station!]! @relation(link: INLINE)
    }
    type SubscriptionStationsSection @embedded {
      id: ID! @id
      name: String!
      stations: [Station!]! @relation(link: INLINE)
    }
    error:
    Copy code
    prisma         | org.bson.BsonInvalidOperationException: Value expected to be of type DOCUMENT is of unexpected type ARRAY
    prisma         | 	at org.bson.BsonValue.throwIfInvalidType(BsonValue.java:419)
    prisma         | 	at org.bson.BsonValue.asDocument(BsonValue.java:47)
    prisma         | 	at com.prisma.api.connector.mongo.extensions.BisonToGC$.apply(MongoExtensions.scala:74)
    prisma         | 	at com.prisma.api.connector.mongo.extensions.DocumentToRoot$$anonfun$1.$anonfun$applyOrElse$2(MongoExtensions.scala:137)
    prisma         | 	at scala.Option.map(Option.scala:146)
    prisma         | 	at com.prisma.api.connector.mongo.extensions.DocumentToRoot$$anonfun$1.applyOrElse(MongoExtensions.scala:137)
    prisma         | 	at com.prisma.api.connector.mongo.extensions.DocumentToRoot$$anonfun$1.applyOrElse(MongoExtensions.scala:134)
    prisma         | 	at scala.collection.immutable.List.collect(List.scala:304)
    prisma         | 	at com.prisma.api.connector.mongo.extensions.DocumentToRoot$.apply(MongoExtensions.scala:134)
    prisma         | 	at com.prisma.api.connector.mongo.extensions.MongoResultReader.readsPrismaNode(MongoExtensions.scala:102)
    prisma         | 	at com.prisma.api.connector.mongo.extensions.MongoResultReader.readsPrismaNode$(MongoExtensions.scala:101)
    prisma         | 	at com.prisma.api.connector.mongo.database.MongoActionsBuilder.readsPrismaNode(MongoActionsBuilder.scala:18)
    prisma         | 	at com.prisma.api.connector.mongo.database.NodeManyQueries.$anonfun$getNodes$3(NodeManyQueries.scala:20)
    prisma         | 	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
    prisma         | 	at scala.collection.immutable.List.foreach(List.scala:388)
    prisma         | 	at scala.collection.TraversableLike.map(TraversableLike.scala:233)
    prisma         | 	at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
    prisma         | 	at scala.collection.immutable.List.map(List.scala:294)
    prisma         | 	at com.prisma.api.connector.mongo.database.NodeManyQueries.$anonfun$getNodes$2(NodeManyQueries.scala:20)
    prisma         | 	at scala.util.Success.$anonfun$map$1(Try.scala:251)
    prisma         | 	at scala.util.Success.map(Try.scala:209)
    prisma         | 	at scala.concurrent.Future.$anonfun$map$1(Future.scala:288)
    prisma         | 	at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
    prisma         | 	at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
    prisma         | 	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
    prisma         | 	at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
    prisma         | 	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    prisma         | 	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    prisma         | 	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    prisma         | 	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
    d
    • 2
    • 1
  • a

    arsan.irianto

    03/05/2019, 9:53 AM
    should we do using docker to connecting server and database with Prisma Client ?
  • m

    Martí Crespí

    03/05/2019, 11:48 AM
    Hi, someone has problems creating a new entity which has a connect type on its mutation?
    • 1
    • 1
  • h

    Hassan

    03/05/2019, 1:26 PM
    Anyone know if the latest GraphQL CLI fullstack boilerplate implements nexus?
    n
    • 2
    • 4
  • j

    jdoyle112

    03/05/2019, 4:23 PM
    Is there any way to have a graphql yoga query with a first argument which can be set to unlimited?
  • j

    jdoyle112

    03/05/2019, 4:24 PM
    The use case is I want to have a query which sometimes is used in pagination where there is a first arg and other times when it should return everything
    w
    • 2
    • 2
  • j

    jdoyle112

    03/05/2019, 8:34 PM
    Anyone know how to delete all nested nodes in a relation?
  • d

    Drew Delianides

    03/05/2019, 9:57 PM
    How would one move a self-hosted prisma server to a new workspace?
  • a

    arsan.irianto

    03/05/2019, 10:47 PM
    hi, how to use prisma without docker? should we do using docker to make graphql server with connecting exsisting database?
  • a

    arsan.irianto

    03/06/2019, 12:02 AM
    i have prisma project deployed with database on heroku with postgre existing database. Connecting to database succeded, but when im query in graphql the data on my tables no exist. whereas in tables the data exist
1...229230231...637Latest