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

    pettanko

    06/11/2018, 7:31 PM
    type User { friends: [User!]! } <= datamodel.graphql Does that field have some issues when it comes to friends_some? I don't understand what is scalar and not xD
    n
    • 2
    • 1
  • h

    hez

    06/11/2018, 9:14 PM
    is there a way in graphql to query just the most recently created object of a given type...without knowing anything about that item? Just "there are things and give me the most recent thing that was added"?
    n
    m
    • 3
    • 18
  • h

    hez

    06/11/2018, 9:14 PM
    Everything seems to want a
    where
    selector to be passed, and that seems separate from sorting
  • a

    alec

    06/11/2018, 11:06 PM
    Has anyone migrated from graphcool to prisma? Any good tutorials or docs on the process? I was using graphcool cause I have no real backend experience
    n
    • 2
    • 1
  • l

    lancej

    06/12/2018, 1:04 AM
    Started having issues with
    graphql codegen
    I updated the model with extra types and it started to give this error. Even when reverting to a model that did work still gives this error. Anyone came across this?
    Copy code
    { GraphQLError: Syntax Error: Expected Name, found }
        at syntaxError (/Users/.../projects/.../node_modules/graphql/error/syntaxError.js:24:10)
        at expect (/Users/.../projects/.../node_modules/graphql/language/parser.js:1299:32)
        at parseName (/Users/.../projects/.../node_modules/graphql/language/parser.js:92:15)
        at parseFieldDefinition (/Users/.../projects/.../node_modules/graphql/language/parser.js:809:14)
        at many (/Users/.../projects/.../node_modules/graphql/language/parser.js:1348:16)
        at parseFieldsDefinition (/Users/.../projects/.../node_modules/graphql/language/parser.js:799:50)
        at parseObjectTypeDefinition (/Users/.../projects/.../node_modules/graphql/language/parser.js:757:16)
        at parseTypeSystemDefinition (/Users/.../projects/.../node_modules/graphql/language/parser.js:663:16)
        at parseDefinition (/Users/.../projects/.../node_modules/graphql/language/parser.js:143:16)
        at parseDocument (/Users/.../projects/.../node_modules/graphql/language/parser.js:110:22)
      message: 'Syntax Error: Expected Name, found }',
      locations: [ { line: 193, column: 1 } ],
      path: undefined }
    • 1
    • 4
  • l

    lancej

    06/12/2018, 1:33 AM
    I think I know why this error occurs. It comes up not on codegen but on
    graphql get-schema --project database
    and only when there is only a collection element.
    Copy code
    type Team {
      members: [Participant!]!
    }
    This will cause the error, but can be corrected if
    name: String
    (or the like) is added. But only after deleting the generated files. It may be down to the lack of unique ID also (which it should have)
    n
    • 2
    • 4
  • m

    matty

    06/12/2018, 1:49 AM
    is the old Graphcool slowly being deprecated? I noticed I can no longer see function logs
    n
    • 2
    • 2
  • l

    Loic

    06/12/2018, 2:36 AM
    Hello! At the end of this blog post https://blog.graph.cool/how-to-deploy-a-prisma-cluster-to-aws-fargate-using-docker-cloudformation-293aa8727b89, it says:
    If you don’t want to fiddle with CloudFormation and the AWS GUI yourself, you can also use Prisma Cloud to easily spin up your own Prisma Clusters.
    but I couldn’t find any information on how to create a Private cluster/server in Prisma Cloud. Is that available on the paid plan only? Thanks!
    n
    • 2
    • 1
  • b

    BotsBotsBots

    06/12/2018, 2:45 AM
    I have a Prisma Fargate instance running and it works great. One thing I'm wondering is why there are two VPCs. Would a PR that put the db and the server into one VPC, with public/private subnets be appreciated or is there something I'm missing here?
    n
    • 2
    • 2
  • s

    splodingsocks

    06/12/2018, 3:41 AM
    Is anyone here using GraphQL-Yoga on AWS Lambda? I’ve sort of gotten it running, but I’m getting this error:
    Warning: handler 'graphql' returned a promise and also use a callback! This is problematic and might cause issues in you lambda.
    n
    • 2
    • 2
  • s

    splodingsocks

    06/12/2018, 3:42 AM
    I’m following this example mostly: https://github.com/prismagraphql/graphql-yoga/blob/master/examples/lambda/serverless.yml
  • d

    Dukuo

    06/12/2018, 6:54 AM
    hey @matic so I was trying to make a directives version of GraphQL Shield but I got sidetracked with what I really have to do, so I decided to give GraphQL Shield a try and I'v got to say, I LOVE IT! Logic-based rules are so flexible, it is a really good middleware you made there... Anyway, I wrote a rules class with useful methods for a RBAC-type of permissions, though I'm not quite sure if it sticks to the RBAC definition at all, but it has roles and scopes and authentication check, I thought you might want to give it a look and see if it makes any sense at all: https://gist.github.com/dukuo/351f581e54b0af863f7155110e8f39c6 . looking forward to any comments from @everyone btw! Next step is to write unit tests to properly check that everything's in order.
    😏 1
    🙌 1
    🦜 1
    m
    • 2
    • 2
  • s

    Slackbot

    06/12/2018, 9:58 AM
    This message was deleted.
    h
    r
    n
    • 4
    • 7
  • t

    terion

    06/12/2018, 10:57 AM
    Can anyone from devs handle this isuue? It is very annoying https://github.com/prismagraphql/prisma-binding/issues/182
    👍 1
    n
    • 2
    • 1
  • p

    panzupa

    06/12/2018, 2:15 PM
    Hi All, How can I export data from existing GraphCool project? I don't have any setup files for a project locally yet
    n
    • 2
    • 6
  • s

    Sébastien

    06/12/2018, 2:25 PM
    Hello everyone prisma green ! I'm new to GraphQL and happy to start learning it with Prisma !
    🙌 1
    😎 4
  • s

    Sikula

    06/12/2018, 2:30 PM
    Hey guys, I was wondering for the most part is seems like Prisma allows you to run queries/mutations on the database. But I was wondering how are cases handled where you want to run a mutation that doesn't directly alter database records (e.g. you need to communicate with an external API or run some background task, etc). Thank you!
    w
    m
    +3
    • 6
    • 13
  • s

    Sébastien

    06/12/2018, 2:46 PM
    After reading the API docs about nested mutation (https://www.prisma.io/docs/reference/prisma-api/mutations-ol0yuoz6go#nested-mutations), i'm a little lost on how I could write resolvers for nested mutation in the application layer... Does anyone have learning resource(s) for this ? 🤔
    n
    • 2
    • 9
  • k

    kgoggin

    06/12/2018, 3:43 PM
    is there an easy way to take a schema defined in SDL and convert it to a .js file? I know the graphql-cli can do it, but seems like only via an introspection query to a running server. Any way to do it based on just the SDL?
    n
    • 2
    • 10
  • t

    timm

    06/12/2018, 4:58 PM
    what the ad
  • n

    nilan

    06/12/2018, 5:08 PM
    Please don't post spam, thanks 🙂
    👍 1
  • d

    Dukuo

    06/12/2018, 5:08 PM
    it's banhammer time
  • k

    K

    06/12/2018, 5:10 PM
    Hi - I just got prisma running on GCE/kubernetes, and I have an exposed endpoint. When I try to prisma add cluster I get an error about this command being deprecated and unavailable in prisma 1.9 (which is the version I’m using), and when I try to prisma deploy to the endpoint, I get an error about the PRISMA_MANAGEMENT_API_SECRET, which is not in the deployment yml in the kubernetes tutorial…
    n
    • 2
    • 12
  • k

    K

    06/12/2018, 5:11 PM
    I really just want to have a backend service for prisma, I’m not married to GCE, so if there’s a simpler/easier way I’m all for it. My understanding is that Prisma Cloud isn’t ready for production projects yet
  • h

    hamdi

    06/12/2018, 5:50 PM
    hi friends i can cache graphql query in client side ? what's the best method ?
    p
    • 2
    • 1
  • p

    peter

    06/12/2018, 6:01 PM
    I am confused with how a subscription endpoint is exposed via
    graphql-yoga
    I have the following options config:
    Copy code
    const options = {
        port: PORT,
        cors: {
          credentials: true,
          origin:
            process.env.NODE_ENV === 'production' && !process.env.FORCE_DEV
              ? ['<https://xxx.app>', /xxx-(\w|-)+\.now\.sh/g, /xxx\.app/]
              : [/localhost/]
        },
        endpoint: '/graphql',
        subscriptions: '/subscriptions',
        playground: '/playground'
      }
    n
    • 2
    • 4
  • m

    medelman

    06/12/2018, 7:05 PM
    Oh Snap! Look what just popped up in my Podcast Feed: https://devchat.tv/js-jabber/jsj-317-prisma-with-johannes-schickling cc @schickling
    🚀 1
    💯 4
  • s

    Steven

    06/12/2018, 7:57 PM
    Hey guys anybody knows if i can still book the regular ticket for graphQL-europe event
    c
    • 2
    • 7
  • j

    jaybauer

    06/12/2018, 8:44 PM
    Hey guys, I’m a bit stuck on something and I don’t know if I’m missing something in the docs or if I’m just confused. I have a list of locations that need to be populated from the server, and only want to get the first unique result from each node. Basically I want to do the equivalent of “DISTINCT” in SQL. How would I approach this in Prisma? EDIT: Found this: https://www.prisma.io/forum/t/how-to-select-distinct/3687 I guess it’s not possible yet.
  • w

    wking

    06/12/2018, 10:43 PM
    Quick Q: Is there a way to set a @unique field or any field to null in a mutation?
    n
    • 2
    • 1
1...545556...637Latest