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

    Luke

    09/30/2018, 12:44 AM
    Anyone have experience writing resolvers for many to many relationships?
  • c

    charlieroth

    09/30/2018, 1:11 AM
    Is there any way I could have a schema like this. If not is there a work around that someone could suggest. Also is it possible to create an
    Enum
    that switches based on predefined types? Edit: Are
    union
    types supported in prisma?
    -.js
  • l

    Luke

    09/30/2018, 2:23 AM
    how can I get the nested relational data back in a query
  • l

    Luke

    09/30/2018, 2:23 AM
    I’m not sure how to write the resolver
  • l

    Luke

    09/30/2018, 2:27 AM
    I keep getting
    Cannot return null for non-nullable field
    d
    • 2
    • 1
  • l

    Luke

    09/30/2018, 2:43 AM
    anyone?
  • l

    Luke

    09/30/2018, 4:09 AM
    How can I write a resolver to only return related data not all
  • l

    Luke

    09/30/2018, 4:25 AM
    anyone?
  • l

    Luke

    09/30/2018, 4:25 AM
    i
  • l

    Luke

    09/30/2018, 4:29 AM
    There are no examples in the docs for querying relational data inside of a query
  • l

    Luke

    09/30/2018, 4:29 AM
    for a many to many
  • l

    Luke

    09/30/2018, 4:30 AM
    I’ve spent hours and hour searching slack, stack overflow, prisma docs, prisma forums
  • l

    Luke

    09/30/2018, 4:30 AM
    I’m close to just giving up and using some other tool
  • l

    Luke

    09/30/2018, 4:31 AM
    i.e.
    Copy code
    query books {
       id
        categories {
            id
         }
    }
    where books to categories is many to many
    s
    • 2
    • 1
  • l

    Luke

    09/30/2018, 4:32 AM
    like how do I write a resolver to find all of the books and for each book all of the categories associated with it
  • l

    Luke

    09/30/2018, 4:33 AM
    basically looking for the
    ActiveRecord
    equivalent of
    includes
    to include another table
    d
    • 2
    • 1
  • l

    Luke

    09/30/2018, 4:44 AM
    maybe this is not possible?
    g
    w
    n
    • 4
    • 52
  • k

    kitze

    09/30/2018, 5:15 AM
    I'm pretty sure I found a bug, but please correct me if I'm wrong. All enum fields return
    null
    unless I override the resolver for the field with a custom string...
    d
    • 2
    • 5
  • l

    Luke

    09/30/2018, 5:16 AM
    @kitze What I’m referring to is a bug?
    k
    • 2
    • 2
  • j

    Jerry Jäppinen

    09/30/2018, 11:21 AM
    When I add a new required field with a default value, I would expect Prisma to apply this default value to existing records during deployment but this seems not to be the case. What is the appropriate way to add a required field with the default value applied to existing records, any tips?
    n
    • 2
    • 3
  • s

    Seba

    09/30/2018, 6:46 PM
    i trying to add one graphql-yoga and 2 endpoints prisma. But doesnt work
    _graphqlconfig_yml.sh
  • s

    Seba

    09/30/2018, 6:50 PM
    after when i run graphql get-schema licenceApi i get error ✖️ database/licenceApi/prisma.yml could not be found.
  • a

    aroman

    09/30/2018, 8:30 PM
    Hi, I just setup a new server using graphql yoga and the latest prisma (1.17). However, when I try to import types from my datamodel into my
    schema.graphql
    I keep getting this error:
    Copy code
    Syntax Error: Cannot parse the unexpected character ".".
    
    GraphQL request (1:1)
    1: ../generated/prisma-client
    In
    schema.graphql
    I am importing as such:
    # import User from "../generated/prisma-client"
    . This is how I did it in past servers I have done. I have
    graphql-import
    packaged added. Has anyone run into this issue? If so, can anyone please point me in the right direction
    y
    • 2
    • 8
  • a

    Austin Howlett

    09/30/2018, 10:58 PM
    @aroman this may not be your issue but in the past I've had issues with relative pathing based on where I started the service/application. Starting it from root usually solved those issues. May not be the same situation but that's what had worked for me.
    a
    • 2
    • 1
  • r

    redmega

    10/01/2018, 3:44 AM
    Hoping this is the right place for this. When I try to deploy via cli in my terminal, it just asks me to authenticate over and over
  • r

    redmega

    10/01/2018, 3:45 AM
    I'm not able to deploy my changes
  • r

    redmega

    10/01/2018, 3:45 AM
    graphcool deploy
    just results in the cli opening a new browser tab to auth every time I click the "Auth" button
  • p

    Patrik Molnar

    10/01/2018, 8:17 AM
    anyone here?
    n
    • 2
    • 10
  • p

    Patrik Molnar

    10/01/2018, 9:18 AM
    Hi, I'm trying to do file uploads based on the s3 example and I'd like to add some additional fields together from Input fields alongside with the file data.. could anyone give me any pointers on how to modify my resolvers to add isPublic, filenameTH, filenameENG and country? When I do the mutation for upload it takes 1 argument -->
    createDocument(file: Upload!):Document!
    , file contains filename, mimetype and the url fields and they are a response after the upload. I want to add 4 extra fields that I send from input fields
  • a

    AzuriteJP

    10/01/2018, 10:32 AM
    Subscriptions question: Single prisma server, two graphql servers both exposing different parts of the underlying Prisma schema; IF I open a subscription to listen for new items of type X on server A, and create those items via server B, will they be picked up and returned by the open subscription on server A??
    d
    • 2
    • 4
1...127128129...637Latest