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

    Andy

    01/09/2019, 4:25 AM
    PSQLException: ERROR: relation "public.Model" does not exist
    . my existing table is named
    models
  • a

    Andy

    01/09/2019, 4:52 AM
    how 2 configure table names
  • l

    ludovic

    01/09/2019, 9:38 AM
    Hello, it is possible to return a number from a subscription using graphql-yoga and prisma-bindings ? This is for a system of queue, we want to display the number of people in the line before you (each time someone quit the line this number is updated) ? I didn't found any post on it
    n
    • 2
    • 2
  • f

    Fran Dios

    01/09/2019, 10:46 AM
    Hi! Has anyone seen this error before?
    Copy code
    [Network error]: FetchError: request to <prisma service url> failed, reason: write EPROTO 140357791845256:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1407:SSL alert number 40
    Both backend and prisma service run in Now v1. It’s probably not related to Prisma itself but maybe somebody had the same issue
  • n

    nus

    01/09/2019, 11:25 AM
    Anyone know how to increase the timeout on a prisma server?
  • s

    Sagar Tambe

    01/09/2019, 11:38 AM
    anyone has example of prisma with ApolloServer (apollo-server-lambda integration)? I am receiving this error if I integrate prisma with apolloserver Cannot return null for non-nullable field User.id.
    j
    • 2
    • 12
  • s

    Sagar Tambe

    01/09/2019, 3:37 PM
    is there any way to restrict users from accessing playground without authentication. I have added PRISMA_MANAGEMENT_API_SECRET and it works fine when I am trying to access prisma service from CLI however I can still access playground from prisma end point
    n
    d
    • 3
    • 2
  • s

    Sagar Tambe

    01/09/2019, 3:38 PM
    this is my current .env file for prisma PRISMA_MANAGEMENT_API_SECRET=xxxx PRISMA_ENDPOINT=http://localhost:4466/xxxx/dev PRISMA_MANAGEMENT_API_SECRET=THISISENCRYPTED
  • m

    Mo

    01/09/2019, 5:47 PM
    @nikolasburk @schickling just wanted to thank you guys for the graphql boilerplates project it's helping a lot as a reference, thanks a lot for making it.
    🙌 2
    n
    • 2
    • 2
  • a

    Andy

    01/09/2019, 7:23 PM
    I want to proxy some queries down from my (apollo server) api into prisma, so I can get things like pagination into postgres for free (i'd rather die than hand write pagination over a db). but the docs are pretty lacking on how to do this - is this an unintended use of prisma?
  • a

    Anthony

    01/09/2019, 7:55 PM
    Very easy to do. in your resolver for Query -> users you can just pass all of the arguments you want (first, skip, after, orderBy) into your prisma.query.users(here, info)
  • a

    Anthony

    01/09/2019, 7:58 PM
    inside query resolver
    Pagination___Sorting.js
  • a

    Anthony

    01/09/2019, 8:07 PM
    Someone might be able to help me as my mind has blanked out a little bit. I can start a new service on my heroku-app using prisma deploy. I just noticed that it seems there is no security / auth on running this command? I feel like anyone who had my app url could just start deploying services?
  • a

    Andy

    01/09/2019, 8:23 PM
    @Anthony is there a way to do a more direct pass-through so that I don't have to duplicate params?
  • a

    Anthony

    01/09/2019, 8:44 PM
    you mean from the client side straight to prisma?
  • w

    warchantua

    01/09/2019, 9:34 PM
    What is the difference between
    prisma generate
    and
    graphql get-schema --project database
    ? It looks like for the same SDL prisma schema they generate different
    prisma.graphql
    files. First generated 3700 LOC when second generated 6500 LOC. Second has comments though
  • w

    warchantua

    01/09/2019, 10:43 PM
    Does
    prisma generate
    support interfaces?
    Copy code
    interface Sortable {
      sort: Int! @default(value: 0)
    }
    
    type Something implements Sortable {
      something: String
    }
    it says
    Copy code
    $ prisma generate                                                                                                                              
    Generating schema !
     ▸    Syntax Error: Unexpected Name "Sortable"
  • j

    Jeongy

    01/10/2019, 12:22 AM
    hey guys Have you ever had this error,
    Error: spawn cmd.exe ENOENT
    ?? I'm trying to login through a command, prisma login. but it gives me this error.
  • a

    Andy

    01/10/2019, 5:22 AM
    do ya'll commit your
    generated/
    folder or git ignore it?
    m
    • 2
    • 2
  • a

    Andy

    01/10/2019, 5:22 AM
    looks kinda nasty to commit
  • a

    Andy

    01/10/2019, 5:34 AM
    I've
    # import Mutation.updateUser from './generated/prisma.graphql'
    but when I run
    updateUser
    from my apollo server playground, it just returns and doesn't seem to do anything
  • n

    Naka

    01/10/2019, 1:03 PM
    Hey ppl! Is there a way to count relation elements during connection query?
  • m

    Mark Fulton

    01/10/2019, 2:49 PM
    GraphiQL lets you share queries by simply sharing a URL with the query data encoded in it; does GraphQL Playground have a similar feature? I'm looking for something independent of graphqlbin for PII related concerns and want to share links for my own hosted version of GraphQL Playground via a serverless handler (https://oss.prisma.io/content/graphql-playground/overview#as-serverless-handler).
  • s

    stevepsharpe

    01/10/2019, 2:58 PM
    Anyone else having issues connecting to Prisma servers?

    https://up.shar.pe/1547132266.png▾

    a
    • 2
    • 1
  • k

    Karl

    01/10/2019, 7:29 PM
    any guides or docs on oauth authentication using the HTML version (https://github.com/prisma/graphql-playground/blob/master/packages/graphql-playground-html/withAnimation.html)?
  • w

    warchantua

    01/10/2019, 8:22 PM
    I developed my schema for prisma, bindings and prisma overall work great. After I got nice pagination, bindings, types, etc from prisma, I need to define pagination myself in my public GraphQL api and this is not fun… Is there any tool to generate pagination for my query type?
  • j

    jamiehalvorson

    01/10/2019, 9:36 PM
    Hey, I’ve just posted this in the forum but wondering if anybody here could help too: https://www.prisma.io/forum/t/relation-doesnt-exist-on-type/5636 How can I access a relation on a type on my server? I’m trying to run:
    Copy code
    const recommended: Class[] = await prisma
          .classes({
            // checks
          })
          .$fragment(`
          fragment Example on Class {
            id
            heroImage { // This is the relation
              public_id
            }
          }
    `);
    However, when I then loop through
    recommended
    and try to access
    heroImage
    I get
    Property 'heroImage' does not exist on type 'Class'
    . When I try to access a single
    class
    it works fine, e.g:
    Copy code
    const example = await prisma.class({ id: "123" }).heroImage();
    
    const exampleHeroID = example.public_id
    Any help or pointers to the right docs would be greatly appreciated
    b
    • 2
    • 8
  • a

    Andy

    01/11/2019, 5:09 AM
    The
    aggregate.count
    query isn't returning the total number of entries, it's only returning the total number for that page. How do I get the total number to show all pages?
  • a

    anthony

    01/11/2019, 6:00 AM
    any idea create data type Int support 64 bit in
    schema.graphql
    ?
    a
    • 2
    • 3
  • h

    hinsxd

    01/11/2019, 7:46 AM
    Hi everyone, can someone give me some advice in organising my queries? I am using React Apollo client with Apollo Server + prisma in backend. Suppose I have a
    me
    query that returns a
    User
    object with a
    posts
    field that return all the posts from a user. I also have a top-level
    posts
    query for general posts queries. It is pretty easy to implement pagination with the top-level queries, but seems a lot more troublesome with the sub-field query. So, if you were me, would you 1) Write a new top-level query
    myposts
    . This may lead to more duplicated codes. In the backend. Also in the frontend, one more
    refetchQueries
    has to be done after each mutation. 2) Implement pagination with incremental fetching inside object in the frontend. This would bring complicated arguments into backend’s subfield. Also more complicated logics in frontend. 3) Fetch all
    myposts
    at once and do client-side pagination only.
1...187188189...637Latest