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

    lowip

    10/17/2017, 4:34 PM
    Hi, I have the following schema:
    Copy code
    # Comment
    # - Schema
    type Comment @model {
      # Generated by server
      id: ID! @isUnique
      createdAt: DateTime!
      updatedAt: DateTime!
    
      # Data
      text: String!
      # - Relations
      parent: Comment @relation(name: "CommentOnComment")
      children: [Comment!]! @relation(name: "CommentOnComment")
      author: User! @relation(name: "UserOnComment")
      post: Post! @relation(name: "PostOnComment")
      votes: [CommentVote!]! @relation(name: "CommentOnCommentVote")
    }
    And the following permission query on
    Comment.create
    (inspired by https://docs-next.graph.cool/guides/auth/authorization-for-a-cms-miesho4goo#editors-can-only-assign-themselves-as-the-document-owner):
    Copy code
    query isUser($user_id: ID!, $authorUser_id: ID!) {
      SomeUserExists(filter: {
        AND: [
          { id: $user_id },
          { id: $authorUser_id }
        ]
      })
    }
    When running the following query (with the right auth token):
    Copy code
    mutation create {
      createComment(
        text: "Waow, amazing",
        authorId: "cj8tal6jg0pxv0192epmhlaha",
        postId: "cj8vshelb01x601742ff1c0tt",
      ) {
        id
      }
    }
    I have the following error:
    Copy code
    Permission Query is invalid. Could not be executed. Error Message: Error during variable coercion. Violations:\n\nVariable '$authorUser_id' expected value of type 'ID!' but value is undefined. Reason: Expected non-null value, found null. (line 1, column 29):\nquery isUser($user_id: ID!, $authorUser_id: ID!) {\n                            ^
    Am I doing something wrong here?
    m
    • 2
    • 7
  • f

    freder

    10/17/2017, 4:38 PM
    when creating users, I want to give them a
    role
    . so I have an enum:
    Copy code
    enum UserRole {
      ADMIN
      USER
    }
    and a signup function that has a
    role
    argument. however, I am encountering this message:
    "Schema Extension Error for function 'signup': Relations are currently not supported. Field 'role'"
    will this be supported (soon)? + what's the workaround in the meantime? creating the user without a role first, and then doing another mutation?
    m
    a
    • 3
    • 3
  • l

    lastmjs

    10/17/2017, 4:48 PM
    Where can I find a list of the previous versions of graphcool? The GitHub repo doesn't have very many releases or tags. I just need to go back a few versions on the beta
    a
    • 2
    • 1
  • h

    humberto.cruz

    10/17/2017, 4:51 PM
    hello, i trying to use graphql-request from graphcool repo. I have a setup.js file that loads or a drawernavigation or a stacknavigation by the value of a state. this value is took reading a local storage value ( SecureStorage from Expo.io ) The login works and saves this token on the local storage but on the setup.js file this takes no action, only after a app reaload... i don't want to use flux or samething like this right now, it would take some time that i dont have
  • h

    humberto.cruz

    10/17/2017, 4:53 PM
    same this on the "logout" button, i remove the local store variable but the setup.js do not re-render, only after a app reload
  • d

    divyendu

    10/17/2017, 4:55 PM
    https://www.graph.cool/forum/t/interoperability-and-graphcoolrc-versioning/1295 Anyone else testing the limits of
    .graphcoolrc
    ? 😉
  • z

    Zak

    10/17/2017, 5:55 PM
    Hey - how does the Graphcool team feel about pull requests from external sources outside of the team?
    a
    z
    • 3
    • 3
  • l

    lastmjs

    10/17/2017, 6:06 PM
    event.environment is empty for me now with this function definition in graphcool.yml:
    Copy code
    assignment-lti-launch:
            handler:
                code:
                    src: ./functions/assignment-lti-launch/assignment-lti-launch.js
                    environment:
                        PRENDUS_LTI_SECRET: ${env:PRENDUS_LTI_SECRET}
            type: resolver
            schema: ./functions/assignment-lti-launch/assignment-lti-launch.graphql
    ✅ 1
    a
    • 2
    • 132
  • a

    amann

    10/17/2017, 6:24 PM
    When deploying a project I am getting this error.. how do I redeploy or delete old local docker projects?
  • a

    amann

    10/17/2017, 6:24 PM
    -.js
  • m

    martin

    10/17/2017, 6:37 PM
    Anyone else experiencing errors using
    graphql-request
    in a webtask? Worked yesterday, but today receiving a
    400
    error.
    Copy code
    'use latest'
    const { request } = require('graphql-request')
    a
    • 2
    • 3
  • m

    mwickett

    10/17/2017, 7:27 PM
    Anyone have an example of a more complex environmental variable setup in a
    graphcool.yml
    file? I”ve looked at https://github.com/graphcool/graphcool/tree/master/examples/env-variables-in-functions, but am wondering about having a single env variable used across multiple functions.
  • d

    diemol

    10/17/2017, 7:36 PM
    Hi all, I have a question about Chromeless
  • d

    diemol

    10/17/2017, 7:37 PM
    when using it with AWS Lambda, if I run tests in parallel, are they isolated?
  • d

    diemol

    10/17/2017, 7:38 PM
    e.g. I need to run the same test with different users, and each user will login with its user/pwd
  • d

    diemol

    10/17/2017, 7:38 PM
    has anyone done something similar?
  • r

    rwatts3

    10/17/2017, 7:44 PM
    Greetings, As a first time user of Graphcool, I must say reading the docs, and website this framework appeared to be promising and exactly what my team needed. I would like to share my observation of this platform. This is strictly my opinion and i'm sure this post will ruffle some feathers, however I believe, in giving critical feedback in hopes to evolve a such a promising platform. I discovered this project after leaving a department meeting by which we discussed plans to move to a graphql framework. After doing some preliminary research I discovered graphcool. Looking at the specs of the project it appeared to accomplish majority of the things we were looking for. With that said, after about a week of reading through docs, issues, and forums I have come to this conclusion. If I were to analyize and or score the Graphcool framework here are the immediate things that stand out to me: [Issues] (primarily windows) - Outdated / Invalid Docs - Lack of response to common questions / concerns regarding the new implementation and migration flow - Unstable release planning do to numerous breaking changes (literally ran a command one day, and the next day the command was missing, with no mention in the docs of the new command) - High community push to migrate to an unstable release. (it's great to get people on the new release, however pushing the vast majority of your community to the unstable release is a sure way to turn serious developers away) - No clear path of future direction (directly relating to constantly changing roadmap of set milestone) - Lack of testing in multi-platform environments. Graphcool@next works when using docker for mac, but is absolutely useless when trying to run a local cluster on Docker Toolbox for Windows. Both follow under the statement "Use Docker" per the docs. - Lack of documentation on how to stand up a dedicated docker cluster, and push to that cluster - Unexpected behavior with authentication loop when trying to deploy to local cluster - Intermittent message when spinning up docker a local cluster on windows "Waiting for Graphcool to initialize. This can take several minutes..." well this message has been here for several hours ? what gives. - Most Importantly : prominent prompt in production environment to convert project to @beta, and states this cannot be reversed. Due to the current state of @next several users are left with less than ideal working environments of their existing project. Countless numbers of development hours lost. [Suggestions] - Discuss a milestone set it in place, and form an iteration plan to accomplish said milestone. @vscode is a great example of this. Monthly iterations with minimal adjustments after the iteration is locked. This allows community devs to have a clear direction of what needs to be done, and where they can help. - Rather than pushing the entire community to try out the @next features, and implementing dialog - Test in multi-platform environments, or invite a distinct list of users from each environment to test new features prior to annoncing to the community to migrate. - The term "Migrate" indicates that the suggested release is ready to use. Use it lightly when making annoncements on the production platform. Unless it is truly ready for migration , that includes all stated supported platforms. This entire statement would be completely useless had there not been such a great push to move to @next. I understand @next is in beta and is subject to change, but I would say the annoncements to move to @next was extremely premature. I know some would say if you don't like the platform make it better. Let me be clear, I absolutely believe Graphcool has the potential to be a leading platform, and would be more than happy to contribute to it's development. I will explore these options with the core contributors in an effort to learn the development workflow and see where I can pitch in.
    👍 3
    a
    n
    • 3
    • 8
  • j

    johhansantana

    10/17/2017, 8:01 PM
    hello. In custom resolvers, could I mutate the data inside graph.cool?
    a
    • 2
    • 1
  • r

    rpeterson

    10/17/2017, 9:56 PM
    Is anyone else having issues loading the new docs? https://docs-next.graph.cool/
    ⛑️ 1
    a
    n
    • 3
    • 3
  • r

    rpeterson

    10/17/2017, 10:01 PM
    moving to github to lookup things, just thought I’d mention it
    👍🏻 1
  • l

    lastmjs

    10/17/2017, 10:56 PM
    My first push of a resolver function, and the server returns a 500
    ✅ 1
    a
    • 2
    • 20
  • l

    lowip

    10/17/2017, 11:23 PM
    Is there a way to prevent enumeration of one of my types, I see a
    list
    option for the permissions (https://github.com/graphcool/graphcool-json-schema/blob/master/src/schema.json#L105) but when running
    graphcool deploy
    I have the following error:
    Copy code
    Global
        ✖ unhandled error: Wrong operation defined for ModelPermission. You supplied: 'list'
    Also, enumeration seems to be enabled for everyone by default
    n
    • 2
    • 16
  • a

    auser

    10/18/2017, 12:17 AM
    the beta version of the docs (docs-next.graph.cool) are down 😕.
  • a

    auser

    10/18/2017, 12:21 AM
    or they don’t load, that is. There are a few errors from graphcool/graphql in the console
    👍🏻 2
    a
    n
    • 3
    • 3
  • a

    auser

    10/18/2017, 12:29 AM
    yep, I saw — just wanted to report
  • a

    auser

    10/18/2017, 12:29 AM
    that was my experience too
  • m

    mwickett

    10/18/2017, 2:03 AM
    @agartha Did anything come of your proposals to allow environmental variables at the
    .graphcoolrc
    level? Trying to setup staging and production graphcool instances, and I want to pass a different root URL (for an email sending function) depending on whether it’s staging or prod.
  • w

    wontwon

    10/18/2017, 2:49 AM
    I can’t seem to figure out permissions right now. Does anyone know how to update permissions?
  • w

    wontwon

    10/18/2017, 3:08 AM
    Anyone
  • w

    wontwon

    10/18/2017, 3:13 AM
    I don’t see my permissions button in my left menu anymore
    n
    • 2
    • 1
1...378379380...637Latest