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

    rem

    03/27/2019, 12:52 PM
    Should this error message be something I want to worry about (after
    prisma deploy
    ):
    Copy code
    post-deploy:
     ▸    Error: output for generator graphql-schema should be a .graphql-file.
     ▸    Please change the output property for this generator in prisma.yml
    I think it started after I upgraded prisma (at some point)
    j
    m
    r
    • 4
    • 7
  • d

    Dinesh

    03/27/2019, 1:38 PM
    Hi all, in my db I have one table that has three fields as updatedBy, createdBy and approvedBy which all are actually fields of same type that is User. However when using prisma deploy, it throws error saying that I can have only 1 or 2 relation of same type
  • d

    Dinesh

    03/27/2019, 1:39 PM
    How to handle such situations usng prisma, where we need three self relations
  • j

    James

    03/27/2019, 3:39 PM
    I made a typo and got a less than helpful error message in 1.29.1
    Copy code
    /home/james/www/scorekeeper-prisma/node_modules/graphql-tools/dist/generate/addResolveFunctionsToSchema.js:79
                    throw new _1.SchemaError(typeName + "." + fieldName + " defined in resolvers, but not in schema");
    I solved the problem but I think that error message can be improved
  • f

    fullstack

    03/27/2019, 4:50 PM
    Hi I followed the tutorials and setup a few example sites with Prisma a few months ago and was very impressed and thank you everyone for their hard work. At the time, I remembered it created non-standard names for the database tables internally (I think I was using PostgreSQL I can't remember). Anyway that is fine for me. I wanted to do a new type of workflow, where I do Frontend development first. I forgot, and I can't immediately find in the document, but does Prisma allow for generating a SQL/NoSQL backend from a GraphQL schema? Sorry I can't remember the workflow.
    c
    • 2
    • 1
  • r

    rdc

    03/28/2019, 3:20 AM
    hi all, I'm new at prisma and always used amplify/appsync. How do I apply Owner Authorization to data models?
    j
    • 2
    • 1
  • j

    jblevins

    03/28/2019, 4:06 AM
    Where are the log files for an internal server error?
  • t

    THpubs

    03/28/2019, 4:08 AM
    Guys my subscriptions are not stable. Have to try multiple times to get connected and then also it disconnects. In the prisma instance, I see the following error:
  • t

    THpubs

    03/28/2019, 4:08 AM
    -.txt
  • t

    THpubs

    03/28/2019, 4:08 AM
    any idea what's happening?
  • h

    H

    03/28/2019, 7:24 AM
    is there someone that can help me with prisma binding querys , im getting different results when i run my query in prisma and when i run in yoga server
  • a

    Adam Thoor

    03/28/2019, 9:40 AM
    Hello!
  • a

    Adam Thoor

    03/28/2019, 9:42 AM
    I've got a question about fetching data Let's say i got this code
    Copy code
    const board = await prisma.board({
                    id: request.params.id
                });
    this would give me a single board, nothing fancy there, but lets say i would like to get the board AND lists associated with the board I could run the previous code and then run
    Copy code
    const lists = await prisma.board({
                    id: request.params.id
                }).lists();
    And merge the results, but is there way to automatically get them both?
    h
    • 2
    • 2
  • t

    THpubs

    03/28/2019, 9:47 AM
    @Adam Thoor are you using prisma bindings?
  • a

    Adam Thoor

    03/28/2019, 10:22 AM
    @THpubs I dont believe I am
  • a

    Adam Thoor

    03/28/2019, 10:22 AM
    Would that make it possible?
  • m

    Martin Köhn

    03/28/2019, 10:38 AM
    Hi I try to introspect an existing postgres database. I have made the following steps: - prisma init myproject - enter necessary database credentials - the schema was generated successfully - start local docker with prisma - execute "prisma deploy" When running prisma deploy the process hangs up with the message
    'ECONNRESET': request to <http://localhost:4466/management> failed, reason: socket hang up
    When I print the log from the docker container I see the following error:
    Encountered unknown SQL type date with column datevalue. IntrospectedColumn(datevalue,date,null,true)"}}
    It seems that prisma could not work with the postgres "date" type. Is there a solution or workaround for that? I'm using Prisma 1.29.2.
    h
    • 2
    • 2
  • i

    Industrial

    03/28/2019, 12:32 PM
    Hi. I have two services: Prisma and GraphQL Yoga. Prisma is private and not exposed to the Proxy, the Yoga service is. It's the Public API of the Prisma Service, which sits in front of PostgreSQL. https://github.com/Industrial/test-next.js/tree/develop/services/prisma https://github.com/Industrial/test-next.js/tree/develop/services/api (Yoga) Now inside the API service I have two methods,
    createChart
    (https://github.com/Industrial/test-next.js/blob/develop/services/api/src/server/resolvers/Mutation/createChart.js) and
    deleteChart
    (https://github.com/Industrial/test-next.js/blob/develop/services/api/src/server/resolvers/Mutation/deleteChart.js). When I call
    createChart
    from my app, this is the output: https://gist.github.com/Industrial/8b839cbba7a872f1e9dbd0a95a013a3b For
    deleteChart
    the output is:
    Copy code
    [33mapi_1              |[0m deleteChart options { data: { where: { id: 'cjtslwjqb000m0b78y3b48mfh' } } }
    [33mapi_1              |[0m deleteChart result undefined
    Seems there isn't even a request going out to the Prisma server from the Yoga server. Why? The implementation is identical to createChart.
  • i

    Industrial

    03/28/2019, 12:35 PM
    I tried calling
    await context.prisma.mutation.deleteManyCharts(options, info)
    as well as
    await context.prisma.mutation.deleteChart(options, info)
    . Both don't do anything at all.
  • i

    Industrial

    03/28/2019, 1:00 PM
    I guess the problem is not with Prisma, nor with GraphQL Yoga, but the
    import { Prisma } from 'prisma-binding'
    that I'm using in the Yoga
    context
    object.
  • i

    Industrial

    03/28/2019, 1:11 PM
    I tried generating a Prisma Client but that fills in the hostname/port as defined in the
    prisma.yml
    file, which is
    localhost:8020
    . Thats incorrect for any other microservice.
  • i

    Industrial

    03/28/2019, 1:12 PM
    if I change the url to
    <http://prisma.localtest.me>
    then I get a Prisma Login screen in the browser? What the heck is that? I don't want any hosted service to interfere like that with my development (or snoop on my data)
  • i

    Industrial

    03/28/2019, 1:26 PM
    Oh, it exports { Prisma } which I can then put my own endpoint on. Sweet.
  • s

    Sébastien

    03/28/2019, 1:39 PM
    Hello there 👋, Does anyone have any suggestions for methods/tools to create a complex datamodel? I have to deal with something like 40 types, and i'm becoming crazy to make the correct relations ^^ Bonus question: I would like to add fields named
    createdBy: User
    and
    updatedBy: User
    on most of my types, but I realized that my
    User
    type will have a lot of relations. Is it OK or is there a trick for it?
  • i

    Industrial

    03/28/2019, 2:19 PM
    @Sébastien Don't use 2 way relationships? Your user does not need to refer to all models it can create/update. You will not query it that way, right?
    s
    • 2
    • 7
  • i

    Industrial

    03/28/2019, 2:19 PM
    Complexity (many models) comes at a cost. More work 😉
    😅 1
  • i

    Industrial

    03/28/2019, 2:32 PM
    I can't use Prisma Client in my GraphQL Yoga. That was a misunderstanding. Prisma Client takes the GraphQL out of the loop. I need to forward GraphQL queries from my frontend/SSR (React) to the Prisma server.
  • i

    Industrial

    03/28/2019, 2:33 PM
    So the issue still stands. I am using
    prisma-binding
    and I am calling a query and it does nothing at all. No request going out of API service and no request coming in at Prisma service.
  • i

    Industrial

    03/28/2019, 2:35 PM
    I have made this question into a ticket: https://github.com/prisma/prisma-binding/issues/367
  • n

    Novalis

    03/28/2019, 4:34 PM
    hey, does anyone know if it's possible to send a graphql request to graphql-yoga via the http url (so more like a normal GET Request)?
    n
    • 2
    • 4
1...243244245...637Latest