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

    gsancho

    04/16/2018, 7:55 AM
    Anyone_knows_how_to_solve_this_warning_.xml
  • e

    eliezedeck

    04/16/2018, 8:51 AM
    Hey guys, is anyone using Prisma with Subscription with
    UPDATED
    mutation_in? I can't seem to be able to get any trigger about this. Only
    CREATED
    and
    DELETED
    work
    . I'm beginning to suspect it's a bug, but seeing the fact that we're at Prisma 1.6 (past stable 1.0), I have doubts that it might not be a bug. I have the query:
    Copy code
    subscription DepartmentMutation {
        departmentSubscription(where: {
          mutation_in: [CREATED, DELETED, UPDATED]
        }) {
          mutation
          node {
            id
            name
          }
          updatedFields
          previousValues {
            id
          }
        }
      }
    with Resolver:
    Copy code
    javascript
    const Subscription = {
      departmentSubscription: {
        subscribe: async (parent, { where }, ctx, info) => {
          return ctx.db.subscription.department(where, info)
        }
      }
    }
    n
    m
    • 3
    • 22
  • g

    gsancho

    04/16/2018, 9:04 AM
    Anyone_knows_how_to_solve_this_warning_.xml
  • u

    user

    04/16/2018, 9:04 AM
    @gsancho commented on @gsancho’s file https://prisma.slack.com/files/UA3TSTV7V/FA8AS9E4F/anyone_knows_how_to_solve_this_warning_.xml: const schema = makeExecutableSchema({ typeDefs: importSchema("./src/schema.graphql"), resolvers, resolverValidationOptions :{ requireResolversForResolveType: false }, directiveResolvers })
    Anyone_knows_how_to_solve_this_warning_.xml
  • r

    rein

    04/16/2018, 9:04 AM
    is anyone familiar with this error:
    Copy code
    ERROR: All fields within 'Query' type should have unique names! Non-unique fields: 'news'.
    
    {
      "errors": [
        {
          "message": "All fields within 'Query' type should have unique names! Non-unique fields: 'news'.",
          "requestId": "api:api:cjg20il4nmnif0902huatu123"
        }
      ],
      "status": 500
    }
    n
    • 2
    • 5
  • u

    user

    04/16/2018, 9:28 AM
    @woss commented on @gsancho’s file https://prisma.slack.com/files/UA3TSTV7V/FA8AS9E4F/anyone_knows_how_to_solve_this_warning_.xml: i started getting same warning without apparent reason.
    Anyone_knows_how_to_solve_this_warning_.xml
  • u

    user

    04/16/2018, 9:45 AM
    @gsancho commented on @gsancho’s file https://prisma.slack.com/files/UA3TSTV7V/FA8AS9E4F/anyone_knows_how_to_solve_this_warning_.xml: @woss add resolverValidationOptions :{ requireResolversForResolveType: false }, to schema 😉
    Anyone_knows_how_to_solve_this_warning_.xml
  • u

    user

    04/16/2018, 9:46 AM
    @woss commented on @gsancho’s file https://prisma.slack.com/files/UA3TSTV7V/FA8AS9E4F/anyone_knows_how_to_solve_this_warning_.xml: i saw your prev comment. i’d like to know why it started happening. since i didn’t updated any package 🙂
    Anyone_knows_how_to_solve_this_warning_.xml
  • n

    nilan

    04/16/2018, 9:46 AM
    Please use threads.
  • r

    rein

    04/16/2018, 12:56 PM
    hi guys, Im a little bit miffed about this error when trying to create a simple newsitem:
    Copy code
    [GraphQL error]: Message: Unknown type "NewsItemCreateInput"., Location: [object Object], Path: undefined
    [GraphQL error]: Message: Cannot query field "createNewsItem" on type "Mutation". Did you mean "createDraft"?, Location: [object Object], Path: undefined
    [Network error]: Error: Unknown type "NewsItemCreateInput".
    { Error: Unknown type "NewsItemCreateInput".
    n
    • 2
    • 1
  • w

    Waweru

    04/16/2018, 1:11 PM
    Hi guys. I'm getting this error on GraphiQL. `{ "data": { "customer": { "first_name": null, "last_name": null, "id": null } } } I'm trying to get the data from a localhost REST API using axios on the resolve. The resolve code looks like: customer: `{ type: CustomerType, args: { id: { type:GraphQLInt } }, resolve (parentValue, {id}) { return axios.get(
    127.0.0.1/api/customer/${id}
    ).then(resp => resp.data); } } }`
    j
    n
    • 3
    • 5
  • s

    Sannikay

    04/16/2018, 2:30 PM
    Hi guys, am having issues with the subscription implementation
    Copy code
    static newLinkSubscribe(parent, args, context, info) {
        return context.db.subscription.link(
          { where: { mutation_in: ['CREATED'] } },
          info
        )
      }
    I tried using the "where" filter for subscription using the Howtographql tutorial but it's not working instead if I pass in an empty object it works as shown below
    Copy code
    static newLinkSubscribe(parent, args, context, info) {
        return context.db.subscription.link(
          { },
          info
        )
      }
    n
    • 2
    • 2
  • l

    lewisblackwood

    04/16/2018, 4:13 PM
    👋 Is there a way to specify different
    .env
    files when running
    yarn dev
    using one of the Prisma GraphQL server boilerplates? I'm following the recommended workflow of separating my environments with
    .env
    files and using variables in the
    prisma.yml
    file. This works great when running
    prisma deploy
    with a
    --env-file
    flag. However, running
    yarn dev
    will only read from a
    .env
    file - is there a way to change this?
    m
    • 2
    • 4
  • l

    ldlework

    04/16/2018, 4:17 PM
    @lewisblackwood could you use .env for dev and .env-prod for production, etc?
    l
    • 2
    • 1
  • o

    orr

    04/16/2018, 5:39 PM
    I recently re-deployed two new columns to my Prisma database, and attempting to query them only fails from code. If I use the GraphQL playground to issue the same query, it works. Has anyone ever seen this?
    m
    • 2
    • 1
  • m

    max

    04/16/2018, 6:08 PM
    Any one have a view on performance of nested ctx.db.exists calls? https://www.graph.cool/forum/t/performance-of-nested-ctx-db-exists-calls/3166
  • z

    zonofthor

    04/16/2018, 8:21 PM
    am I not supposed to be able to
    mutation { createNotes: {data: {connect: {...where noteId is XXX...] }} } }
    n
    • 2
    • 5
  • p

    pasa

    04/16/2018, 8:42 PM
    Hey everybody, I have a problem with my setup, that's driving me nuts.... I used @max’s tutorial (https://github.com/maxdarque/prisma-docker), to setup a local cluster, which is called live. I deployed my local node.js based system to live, but even though, it writes a successmsg for the deploy, the db, that is used, is still not my external (self-hosted on dedicated root server) mysql db, but a freshly created db in a local docker container. I'll post my relevant files in a threas, so you can see, what I'm talking about. Maybe someone of you sees the error. I've tried to sort out the issue for the past two days, but hadn't had the slightest success. Thanks in advance! 🙂
    m
    n
    • 3
    • 13
  • s

    Sim

    04/16/2018, 8:47 PM
  • u

    user

    04/16/2018, 8:51 PM
    @Sim commented on @Sim’s file

    https://prisma.slack.com/files/U9YB34U9Y/FA8LNPJ6S/image.png▾

    : even i can see the token in the response too :S , AFAIK we need to hide so no one can use it against our app . or i am getting the whole idea wrong , this is coming from full advance boiler plate example. how do i hide password and this data , even though i am making a post call then what is going on why every thing is so openly visible , can any one please explain to me ?
  • w

    windkomo

    04/16/2018, 8:57 PM
    Hi all, can anyone explain how a list upsert operation works? I want to update a list of
    ChecklistItem
    that’s part of another another model. The input has this form:
    Copy code
    input ChecklistItemUpsertWithWhereUniqueWithoutRequestInput {
      where: ChecklistItemWhereUniqueInput!
      update: ChecklistItemUpdateWithoutRequestDataInput!
      create: ChecklistItemCreateWithoutRequestInput!
    }
    What data do I need to provide for the upserts to be successful? I don’t understand why the
    where
    field is needed in the case of a “create” upsert
    h
    • 2
    • 15
  • u

    user

    04/16/2018, 9:00 PM
    @huv1k commented on @Sim’s file

    https://prisma.slack.com/files/U9YB34U9Y/FA8LNPJ6S/image.png▾

    : Use https? and your communication is secure?
  • s

    Sim

    04/16/2018, 9:25 PM
    i am testing it on my local cluster
    h
    a
    • 3
    • 11
  • s

    Sim

    04/16/2018, 9:25 PM
    localhost !
  • z

    zonofthor

    04/16/2018, 9:29 PM
    newbie question... can I on Prisma mix together my custom resolvers and the built in ones?
    h
    • 2
    • 4
  • r

    rwatts3

    04/16/2018, 9:33 PM
    Hi Everyone, I am wondering if someone can give me some insight on the graphql "functions" equivalent in Prisma. or how to use functions when using prisma
    h
    • 2
    • 4
  • l

    lawjolla

    04/16/2018, 9:44 PM
    For anyone looking for "Node Dev Ops for Dummies", I really recommend this course. https://www.udemy.com/advanced-node-for-developers/learn/v4/overview Sometimes Stephen is maddeningly slow, but I've really learned how Node works. You should be able to pick it up on discount for ~$10. Well worth it!
    👍 3
  • s

    sajmil

    04/17/2018, 12:00 AM
    anyone getting hella internal server errors?
  • d

    dohomi

    04/17/2018, 2:23 AM
    @sajmil are you talking about graph.cool or prisma?
  • d

    dohomi

    04/17/2018, 2:59 AM
    I think us-west-2 seems to have trouble. I receive lots of internal server errors as well.
12345...637Latest