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

    valstu

    05/27/2018, 8:58 PM
    Not sure where to post this (correct me if this doesn’t belong here). I noticed a small bug on on Prisma Console Admin UI. When you’re using data browser and you have more than 50 row on your data table the data browser will start to paginate your rows. It loads the first 50 records and when you scroll to bottom of the table it loads more. I have 64 records and after loading more items it doesn’t show the last one. I can only see 63 records. If I add one more row to my db I can only see 64 instead of 65 and so on.
    👍 1
    h
    • 2
    • 3
  • g

    gauthier

    05/27/2018, 9:02 PM
    Copy code
    TSError: ⨯ Unable to compile TypeScript
    src/index.ts (62,34): Argument of type '{ context: { db: Prisma; }; resolvers: { Query: { user: (parent: any, args: any, context: any, in...' is not assignable to parameter of type 'Props'.
      Types of property 'resolvers' are incompatible.
        Type '{ Query: { user: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }; }' is not assignable to type 'IResolvers'.
          Property 'Query' is incompatible with index signature.
            Type '{ user: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }' is not assignable to type '(() => any) | IResolverObject | GraphQLScalarType'.
              Type '{ user: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }' is not assignable to type 'GraphQLScalarType'.
                Property 'name' is missing in type '{ user: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }'. (2345)
        at getOutput (/Users/gauthierrodaro/Projects/axio/axio/server/node_modules/ts-node/src/index.ts:330:15)
        at Object.compile (ts-node/src/index.ts:518:11)
        at Module.m._compile (/src/index.ts:403:43)
        at Module._extensions..js (module.js:646:10)
        at Object.require.extensions.(anonymous function) [as .ts] (/src/index.ts:406:12)
        at Module.load (module.js:554:32)
        at tryModuleLoad (module.js:497:12)
        at Function.Module._load (module.js:489:3)
        at Function.Module.runMain (module.js:676:10)
        at Object.<anonymous> (ts-node/src/bin.ts:145:12)
    error Command failed with exit code 1.
    resolver-forwarding_typescript_issue.ts
  • g

    gauthier

    05/27/2018, 9:03 PM
    I just followed https://github.com/prismagraphql/prisma/blob/master/examples/resolver-forwarding/index.js
    n
    • 2
    • 2
  • d

    Dukuo

    05/27/2018, 9:22 PM
    is Prisma a production flow tool ? I mean, when developing a GraphQL Server do you need to have Prisma all the time or is it more of a schema-to-db compiler ?
    s
    n
    • 3
    • 3
  • u

    UsulPro

    05/27/2018, 10:57 PM
    Hello! Is there any way to delete files uploaded to a
    graphcool
    service? It looks like they're still reachable even after deleting appropriate
    File
    node from db 🤔 Actually I removed everything from
    File
    , but all images still available... 🙄
    n
    • 2
    • 2
  • s

    Sam Jackson

    05/28/2018, 12:28 AM
    I have this model defined:
    Copy code
    type Post {
      id: ID! @unique
      text: String!
      parent: Post @relation(name: "PostParent", onDelete: SET_NULL)
      children: [Post!]! @relation(name: "PostParent", onDelete: CASCADE)
      author: User! @relation(name: "UserPosts", onDelete: SET_NULL)
    }
    If a post is deleted, I want all of its children to be deleted as well. However, I get this error:
    Copy code
    There was a loop in the path generated by the onDelete: Cascade directives on your schema when trying to do the delete.
    Any thoughts on how to achieve the desired effect?
    j
    n
    • 3
    • 5
  • v

    virtualirfan

    05/28/2018, 5:57 AM
    Trying to follow along [tutorial](https://blog.graph.cool/tutorial-building-a-realtime-graphql-server-with-subscriptions-2758cfc6d427) for subscriptions on
    prisma
    , I have a Subscription resolver that ends up in it's request object being undefined. Has anyone tried Subscription with auth? More details in thread:
    w
    • 2
    • 3
  • v

    valstu

    05/28/2018, 7:56 AM
    If I
    prisma deploy
    to Prisma Cloud is the Playground publicly available to anyone if they happen to know the url?
    n
    • 2
    • 1
  • v

    valstu

    05/28/2018, 8:01 AM
    Is there way to limit the access to only Prisma Cloud users or something?
    n
    • 2
    • 3
  • s

    Saqib

    05/28/2018, 8:30 AM
    simple smile
    👋 1
  • c

    carstenbaumhoegger

    05/28/2018, 9:35 AM
    hey! I’m trying to populate my database with dummy data and I’m using the
    seed.graphql
    file to do so. I’ve defined 3 mutations to add dummy users and named them differently. When executing I’m getting the following error:
    Copy code
    ERROR: Must provide operation name if query contains multiple operations
    
    {
      "data": null,
      "errors": [
        {
          "message": "Must provide operation name if query contains multiple operations"
        }
      ],
      "status": 200
    }
    The used
    seed.graphql
    works if I copy it into GraphqL Playground. Can the seed file only contain one mutation? Here’s the `seed.graphql`:
    Copy code
    mutation addUserA {
      createUser(data: {
        email: "<mailto:usera@example.de|usera@example.de>"
        password: "$2a$10$hACwQ5/HQI6FhbIISOUVeusy3sKyUDhSq36fF5d/54aAdiygJPFzm"
        firstname: "User"
        lastname: "A"
      }) {
        id
      }
    }
    
    mutation addUserB {
      createUser(data: {
        email: "<mailto:userb@example.de|userb@example.de>"
        password: "$2a$10$hACwQ5/HQI6FhbIISOUVeusy3sKyUDhSq36fF5d/54aAdiygJPFzm"
        firstname: "User"
        lastname: "B"
      }) {
        id
      }
    }
    
    mutation addUserC {
      createUser(data: {
        email: "<mailto:userc@example.de|userc@example.de>"
        password: "$2a$10$hACwQ5/HQI6FhbIISOUVeusy3sKyUDhSq36fF5d/54aAdiygJPFzm"
        firstname: "User"
        lastname: "C"
      }) {
        id
      }
    }
    n
    s
    • 3
    • 10
  • h

    huv1k

    05/28/2018, 12:15 PM
    Does somebody have working permissions in GCF? 😄
    ☝️ 1
    😆 1
    • 1
    • 1
  • h

    halborg

    05/28/2018, 12:36 PM
    How do you provide a default enum value to a property? I’ve tried
    Copy code
    gender: GenderEnum! @default(value: "UNKOWN")
    gender: GenderEnum! @default(value: UNKOWN)
    gender: GenderEnum! @default(value: GenderEnum.UNKOWN)
    
    enum GenderEnum {
      MALE
      FEMALE
      UNKNOWN
    }
    n
    r
    • 3
    • 7
  • m

    Moritz

    05/28/2018, 12:42 PM
    Hi, im getting the following error message
    Copy code
    TSError: ⨯ Unable to compile TypeScript
    src/index.ts (6,34): Argument of type '{ typeDefs: string; resolvers: { Query: { users: (parent: any, args: any, context: any, info: Gra...' is not assignable to parameter of type 'Props'.
      Types of property 'resolvers' are incompatible.
        Type '{ Query: { users: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; profil...' is not assignable to type 'IResolvers'.
          Property 'Query' is incompatible with index signature.
            Type '{ users: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; profiles: (pare...' is not assignable to type '(() => any) | IResolverObject | GraphQLScalarType'.
              Type '{ users: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; profiles: (pare...' is not assignable to type 'GraphQLScalarType'.
    Quite interestingly, this only happens when I run the server locally, not when I deploy to now. Why could this be happening? This is how some of the resolvers look:
    Copy code
    export const Query = {
      users: forwardTo("db"),
      profiles: forwardTo("db"),
      posts: forwardTo("db"),
      events: forwardTo("db"),
      venues: forwardTo("db"),
      artists: forwardTo("db"),
    
      profile(parent, { id }, ctx: Context, info) {
        return ctx.db.query.profile({ where: { id } }, info);
      },
      async me(parent, args, ctx: Context, info) {
        const id = await getUserId(ctx);
        return ctx.db.query.user({ where: { id } }, info);
      },
    b
    n
    • 3
    • 20
  • s

    simz

    05/28/2018, 1:08 PM
    hello i'm looking for somewhere i can find different schema database/resolver for different auth (Facebook, github ect...) I see lot of template from graphcool on different boilerplate; there is a internet link to help us to share easily all these schema ? like a ui stored api ready to use who help us to do it ? i guess there is platform we need to pay?
    w
    • 2
    • 11
  • s

    simz

    05/28/2018, 1:31 PM
    I'm looking for some ui online to plugin easily resolver and schema Facebook-instagram auth flow for any prisma application in a easy way (like get a template to use it)
  • y

    ylli

    05/28/2018, 1:41 PM
    Hello Everyone! I'm trying to use prisma with cockroachdb, since based on this tweet: https://twitter.com/_schickling/status/994150859788431361 its compatible with it. But I'm getting this error:
  • y

    ylli

    05/28/2018, 1:41 PM
    Copy code
    Exception in thread "main" java.sql.SQLTransientConnectionException: database - Connection is not available, request timed out after 5000ms.
            at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:548)
            at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:186)
            at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:145)
            at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:83)
            at slick.jdbc.hikaricp.HikariCPJdbcDataSource.createConnection(HikariCPJdbcDataSource.scala:18)
            at slick.jdbc.JdbcBackend$BaseSession.<init>(JdbcBackend.scala:439)
            at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:47)
            at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:38)
            at slick.basic.BasicBackend$DatabaseDef.acquireSession(BasicBackend.scala:218)
            at slick.basic.BasicBackend$DatabaseDef.acquireSession$(BasicBackend.scala:217)
            at slick.jdbc.JdbcBackend$DatabaseDef.acquireSession(JdbcBackend.scala:38)
            at slick.basic.BasicBackend$DatabaseDef$$anon$2.run(BasicBackend.scala:239)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at java.lang.Thread.run(Thread.java:748)
    Caused by: org.postgresql.util.PSQLException: Transaction isolation level -1 not supported.
            at org.postgresql.jdbc.PgConnection.setTransactionIsolation(PgConnection.java:833)
            at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:378)
            at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:346)
            at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:193)
            at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:430)
            at com.zaxxer.hikari.pool.HikariPool.access$500(HikariPool.java:64)
            at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:570)
            at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:563)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  • y

    ylli

    05/28/2018, 1:42 PM
    does anyone know if there is a way to adjust the isolation level or can someone at least confirm that they got prisma working with cockroachdb?
    d
    k
    n
    • 4
    • 5
  • j

    Jeff

    05/28/2018, 4:00 PM
    The description not show in the graphql playground.
    How_to_add_fields_description.js
  • s

    Sam Jackson

    05/28/2018, 6:01 PM
    Is it possible to write a resolver that uses one of my defined types? Something with multiple attributes, not just a scalar value. Or would it be better just to use JSON.stringify as a String parameter and parse it on my server?
    n
    • 2
    • 4
  • v

    virtualirfan

    05/28/2018, 10:14 PM
    In the graphcool days, there used to be a mutation field in the schema for
    Relay
    called
    clientMutationId
    . Anyone know the fate of that? Is there an equivalent construct in
    Prisma
    ?
    n
    • 2
    • 1
  • c

    chasm

    05/28/2018, 10:23 PM
    Quick question: is it possible to run Prisma in a single docker image (db and all)? I've looked around and the answer appears to be no. If not, is it on the map somewhere?
    l
    n
    • 3
    • 2
  • p

    Plínio Naves

    05/28/2018, 11:38 PM
    Good night people! Can you tell me if Graphcool will be discontinued? I am an instructor at Udemy and I am recording a course on it with Angular, my fear is that soon it will be discontinued.
  • r

    ryanmagoon

    05/29/2018, 12:28 AM
    @Plínio Naves it’s clearly not the main focus of development
  • r

    ryanmagoon

    05/29/2018, 12:28 AM
    I think it’s only being maintained at this point
  • r

    ryanmagoon

    05/29/2018, 12:29 AM
    If you want to do something that won’t go stale I might suggest a
    graphql-yoga
    setup with prisma similar to what they’re doing with the howtographql.com tutorials
  • c

    chasm

    05/29/2018, 12:47 AM
    @Plínio Naves I second the idea of using the howtographql.com tutorials. They're excellent.
  • v

    virtualirfan

    05/29/2018, 3:08 AM
    @chasm Good tutorials though it looks like the
    Relay
    ones are out of date with the actual changes in the Prisma API.
  • s

    siyfion

    05/29/2018, 9:48 AM
    Is there anyway that I can get
    prisma deploy
    to read my
    .envrc
    file as opposed to a
    .env
    file?
    n
    • 2
    • 3
1...424344...637Latest