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

    Entrepreneur3

    09/15/2018, 4:06 PM
    Hey guys, I started using Prisma and following this official Guide: https://www.prisma.io/docs/get-started/03-build-graphql-servers-with-prisma-e001/ I get this error when executing this command in the terminal:
    Copy code
    node index.js
    Copy code
    GraphQLError: Syntax Error: Cannot parse the unexpected character ".".
  • e

    Entrepreneur3

    09/15/2018, 4:07 PM
    How can this happen? I copied the code 1 by 1 from the guide
  • e

    Entrepreneur3

    09/15/2018, 4:26 PM
    It's annoying that there always must be something
  • e

    Entrepreneur3

    09/15/2018, 4:29 PM
    I figured out that the error occurs because of this line of code:
    Copy code
    const server = new GraphQLServer({
        typeDefs: './schema.graphql', <-- This line invokes the syntax error for some reason..
        resolvers,
        context: { 
          prisma
        },
      })
      server.start(() => console.log('Server is running on <http://localhost:4000'>))
  • e

    Entrepreneur3

    09/15/2018, 4:31 PM
    Why does that happen?
  • a

    alec

    09/15/2018, 4:36 PM
    Anyone have any knowledge on how well the graphcool framework can scale with ~10k users?
  • c

    colburn

    09/15/2018, 6:21 PM
    Anyone know where I can report a documentation issue. Under the schema delegation page on the prisma client doc, it appears the resolvers are incorrect. https://www.prisma.io/docs/prisma-client/api-reference/schema-delegation-JAVASCRIPT-pyl7/
  • c

    colburn

    09/15/2018, 6:22 PM
    -.js
  • a

    abhiaiyer

    09/15/2018, 6:56 PM
    Hi @colburn do you mind filing an issue?
  • a

    abhiaiyer

    09/15/2018, 6:57 PM
    Schema Delegation was removed from prisma client and it’s recommended to use prisma binding for that functionality
  • c

    colburn

    09/15/2018, 7:14 PM
    @abhiaiyer Sure thing, I'll file an issue when I get back home. Thanks for the response.
  • i

    iago

    09/15/2018, 8:05 PM
    suggestion: adding to docs an example of a working with batch of creates (had to chunk insertions -- was getting prisma java errors).. something like
    Copy code
    const chunks = function(array, size) {
        let results = []
        while (array.length) {
          results.push(array.splice(0, size))
        }
        return results
      }
    
      const inserted = []
      for (const chunk of chunks(arr_X_data, 30)) {  // eslint-disable-line no-loops/no-loops
        inserted.concat(
          await Promise.all(                        // eslint-disable-line no-await-in-loop
            chunk.map(
              (data)=> prisma.mutation.createX({ data })
            )
          )
        )
      }
  • l

    Luke

    09/16/2018, 3:08 AM
    anyone else run into
    generate is not a prisma command.
    from the post deploy hook in
    prisma.yml
    ?
  • l

    Luke

    09/16/2018, 3:10 AM
    Copy code
    ➜  lyra-api prisma deploy
    Deploying service `default` to stage `default` to server `local` 79ms
    Service is already up to date.
    
    post-deploy:
     ▸    generate is not a prisma command.
     ▸    Perhaps you meant cluster-token
     ▸    Run prisma help for a list of available commands.
    
    Get in touch if you need help: <https://www.prisma.io/forum/>
    To get more detailed output, run $ export DEBUG="*"
    
    Running prisma generate ✖
    ➜  lyra-api prisma | grep generate
      generate        Generate a schema or Prisma Bindings
    ➜  lyra-api
    d
    e
    n
    • 4
    • 5
  • l

    Luke

    09/16/2018, 3:11 AM
    driving me crazy
    w
    • 2
    • 1
  • a

    abhiaiyer

    09/16/2018, 4:40 AM
    What version of Prisma are you using?
  • n

    Nick

    09/16/2018, 11:22 AM
    Guys why have you removed the file-handling example? It redirects you to 404-page https://www.prisma.io/docs/reference/upgrade-guides/graphcool-to-prisma/file-handling-hahcee3eef
    n
    • 2
    • 1
  • m

    maxhogervorst

    09/16/2018, 8:32 PM
    Hi Guys, Just started using Prisma, loving it so far. I found the following article https://www.prisma.io/blog/graphql-directive-permissions-authorization-made-easy-54c076b5368e/ on how to add authorization to fields and mutation, how should i implement this with auto generated mutations? for example updatePost = admin only?
    l
    i
    • 3
    • 14
  • c

    ch3ckmat3

    09/16/2018, 9:09 PM
    how can I manage schema in multiple .graphql files, and combine them at run-time? I don't want to use the
    schema = ""
    trick.
    l
    • 2
    • 2
  • v

    Vanna

    09/17/2018, 4:52 AM
    Hello, when i followed this Prisma on Dokku with Postgres db, i got authentication error org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
    w
    • 2
    • 39
  • v

    Vanna

    09/17/2018, 4:52 AM
    here is the link
  • v

    Vanna

    09/17/2018, 4:52 AM
    https://www.prisma.io/docs/1.14/tutorials/deploy-prisma-servers/dokku-zie0ahhaox#create-the-backing-service
  • k

    kratam

    09/17/2018, 8:21 AM
    Since we no longer need
    prisma-binding
    , how can we use
    extractFragmentReplacements
    ? Which package exports it?
  • m

    Moritz

    09/17/2018, 8:47 AM
    Hi, just migrating to prisma client. Using the graphql yoga as a server environment, what is the best way to hand over the query to the client from a resolver in the usual form, i.e.
    Copy code
    groups(parent, args, ctx, info) {
        // pass the query params to the client
      }
    ? should I simply stick to the
    $delegate
    option like mentioned in @lawjolla migration guide, or is it intended to be used with the
    $request(query)
    options from the docs? Whats the way to go?
    👍 1
    d
    n
    • 3
    • 8
  • m

    Moritz

    09/17/2018, 12:16 PM
    Anyone?
    w
    b
    n
    • 4
    • 6
  • e

    Errorname

    09/17/2018, 2:18 PM
    Hi everyone! Looking at the documentation for 1.17, it feels like Prisma Client is replacing
    prisma-binding
    . I agree that Prisma Client is a great piece of software and really useful, but I feel like it doesn't apply for the use case where your frontend is using graphql to discuss with your backend. I think that prisma binding is a top notch tool for this kind of use, and therefore should stay in the documentation, next to the Prisma Client. What do you think?
    💯 3
    k
    w
    n
    • 4
    • 5
  • k

    kratam

    09/17/2018, 2:28 PM
    I'm trying to migrate a pet project to use the prisma client instead of
    prisma-binding
    . A few questions: - My resolvers use
    fragment:
    props. Should I import
    extractFragmentReplacements
    from
    graphql-binding
    from now on? - I'm using typescript and
    prisma.user({ id: userId }).$fragment(fragment)
    seems to return
    {}
    . What am I doing wrong? (
    fragment
    is a string) - Is it possible to pass the
    info
    to the prisma query in order to retrieve connections? The $delegate seems to be gone from
    prisma
    . - Is there a 1.16 => 1.17 migration guide?
    n
    • 2
    • 2
  • j

    jdoyle112

    09/17/2018, 3:47 PM
    Hello has anyone deployed a prisma server to zeit now following this tutorial? https://www.prisma.io/docs/1.14/tutorials/deploy-prisma-servers/zeit-now-and-google-cloud-sql-mohj5eiwot
    n
    • 2
    • 1
  • j

    jdoyle112

    09/17/2018, 3:48 PM
    I was able to deploy but when I access the playground, the schema is not loading. Not sure what the problem is. Thinking it could be something in my prisma.yml config file.
    p
    h
    n
    • 4
    • 17
  • j

    jdoyle112

    09/17/2018, 3:50 PM
1...119120121...637Latest