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

    nilan

    08/11/2017, 8:28 AM
    Hey @antho1404 I am not sure what you base your conclusion on, but it's wrong šŸ™‚ A very similar problem is already documented here, including a workaround: https://github.com/graphcool/api-bugs/issues/188
  • a

    antho1404

    08/11/2017, 8:33 AM
    my bad so, I didn’t work for few days on my project and everything was working great and today i tried to migrate with the new enum but i’ve got a lot and permission error and i saw this bug but maybe just a problem i had before and didn’t see until now
    n
    • 2
    • 9
  • r

    rob.s

    08/11/2017, 9:00 AM
    Hi everybody - following instructions here - https://github.com/graphcool-examples/react-native-graphql/tree/master/authentication-with-auth0-and-apollo - the app crashes on load after
    react-native run-ios
    . The Red Box says "undefined is not an object (evaluating 'argv.indexOf')", which is coming from
    ${root}node_modules/supports-color/index.js:4:22
    . Google search yesterday and today no help.
    n
    • 2
    • 10
  • r

    rob.s

    08/11/2017, 11:58 AM
    Do permissions queries support logical NOTs? If so, how? Simple example: if a user submits a link for voting, that user should NOT be allowed to vote on the link
    d
    n
    • 3
    • 40
  • e

    evan

    08/11/2017, 1:49 PM
    Hey all, still learning graph.cool. I'm looking to build the backend for a poll app -- storing multiple options (dynamic amount of them) and a number value associated to it. I'm not sure how I would go about structuring it in .cool. My idea is that there would be a NumVotes, Poll, and Option type... Being related by Poll ID and Post ID. This is probably faily simple but coming from a mongo background its hard for me to wrap my head around this architecture
    n
    • 2
    • 3
  • e

    evan

    08/11/2017, 1:52 PM
    I have an existing architecture made up that will store the poll + options, but without votes
  • s

    steveb

    08/11/2017, 3:48 PM
    Are there any docs/examples regarding creating mutations in graph.cool?
  • s

    steveb

    08/11/2017, 3:49 PM
    nevermind, I just found this: https://www.graph.cool/docs/reference/simple-api/custom-mutations-thiele0aop/
    n
    • 2
    • 1
  • g

    gojutin

    08/11/2017, 4:10 PM
    Sorry if this has been discussed in the past and I missed it, but I’d love to hear what front-end client most folks in here ended up going with for their projects. It’s become clear to me that Relay Modern has a much more notable learning curve, but I am wondering if anyone has reached the conclusion that it is worth the additional investment in time. I realize that this is subjective and dependent on each project’s needs so I guess I am just asking generally. Is there anything that Relay Modern is providing that you just don’t get with Apollo. Or vice versa?
    n
    • 2
    • 2
  • c

    coffenbacher

    08/11/2017, 8:13 PM
    Hey @nilan , how do you see the role of this slack vs. the forum? I'm not sure which is more relevant to me to follow šŸ™‚ which questions / discussions should go where?
    šŸ‘ 1
    d
    n
    • 3
    • 3
  • m

    mikedklein

    08/11/2017, 8:41 PM
    Is it possible to create a required field that doesn't have default like force graphql to return an error?
  • d

    Daniel K.

    08/11/2017, 9:00 PM
    hi, I have currently small NodeJS server built with Apollo, it's session based so I can query for some data based on variables in a session what would be best approach with graphcool ? I've noticed it's stateless, so that essentially means I need to keep state in a client? what about security? data on client could be tampered with and user can then access anything ... I don't think that permission system can handle that since it cannot be based on some state
  • j

    johnny

    08/11/2017, 10:37 PM
    Can anyone tell me what's wrong with this attempt?
    Copy code
    query ($user_id: ID!, $node_id: ID!) {
      SomeUserExists(
        filter: {
          OR: [{
            AND: [{
              id: $user_id
            },{
              id: $node_id
            }]
          },{
            id: $user_id,
            roles_some: {
              name: "admin"
            }
          }]
        }
      )
    }
    What I'm trying to achieve is, that only an admin or the user itself can read or update an entry in the User table. It's working fine for a user with "admin"-role, but a normal user cannot access his own information anymore.
    n
    • 2
    • 7
  • q

    quadsurf

    08/11/2017, 10:59 PM
    were there updates made to how relationships are linked/connected/generated? several months ago, the pattern was a 2-step mutation pattern where i'd first create the node then second, connect node. But a month ago i began having the ability to consolidate this pattern into a single mutation, but it looks like as of today, it no longer works... i think the userx field redundancy as seen below, may have something to do with it: createDistributor( bizName: String bizUri: String distId: String! logoUri: String userxId: ID userx: DistributoruserxUser ): Distributor while does my Schema's personalized docs have the userx field listed twice? (note that userx and userxId are the same foreign-relationship-hosting field)
    šŸ‘ 1
    n
    • 2
    • 1
  • d

    Daniel K.

    08/12/2017, 7:49 AM
    hi, is it possible to do something like this? I mean parametrized field
    userAccess
    ... it would probably require some function to compute that, but if I try to do this, I am getting error
    The relation field
    userAccess
    must specify a
    @relation
    directive:
    @relation(name: "MyRelation")
    that doesn't make much sense to me
    Copy code
    type Game implements Node {
      id: ID! @isUnique
      createdAt: DateTime!
      updatedAt: DateTime!
      organizer: User! @relation(name: "GameOrganizer")
      players: [Player!]! @relation(name: "PlayerGame")
      applicants: [User!]! @relation(name: "UserApplication")
      userAccess(userId: ID): UserGameAccess
    }
    enum UserGameAccess {
      APPLICANT
      PLAYER
      ORG
    }
  • d

    Daniel K.

    08/12/2017, 7:52 AM
    to be clear why I need that ... one User can be in multiple Games and with difference access level for each game I need to be able to find out this access level so I know what to display in the app for that user
    n
    • 2
    • 12
  • d

    Daniel K.

    08/12/2017, 10:54 AM
    I am feeling super confused ... where can I add code for Function that's called from the Schema Extension?
  • d

    Daniel K.

    08/12/2017, 10:55 AM
    since Schema Extension seems to be beta feature, do I need to enable it somewhere?
  • f

    freddie-codogo

    08/12/2017, 11:18 AM
    Anyone around fancy lending me 5 minutes to help construct a perticularly tricky mutation?
    n
    • 2
    • 2
  • j

    jscript

    08/12/2017, 11:28 AM
    Hello everyone, I am following along with the how to graphql tutorials and I am right now at chapter authentication where I am supposed to enter two values for
    GC_USER_ID
    and
    GC_AUTH_TOKEN
    anyone here knows where I can get those values?
  • m

    mattd

    08/12/2017, 11:39 AM
    Hi, @jscript! You start off by initializing those values like so in
    constants.js
    (note that ā€œgraphcool-user-idā€ and ā€œgraphcool-auth-tokenā€ are just strings and do not need to be replaced by anything):
    Copy code
    export const GC_USER_ID = 'graphcool-user-id'
    export const GC_AUTH_TOKEN = 'graphcool-auth-token'
    Further down in the Routing section of the tutorial you should notice this block of code:
    Copy code
    _saveUserData = (id, token) => {
        localStorage.setItem(GC_USER_ID, id)
        localStorage.setItem(GC_AUTH_TOKEN, token)
      }
    Here you are setting these values in localstorage with the
    id
    and
    token
    returned from your
    SigninUserMutation
    . This assumes you are following the React + Apollo tutorial, although other tutorials should be very similar. Please let me know if you have any more questions!
  • j

    jscript

    08/12/2017, 11:48 AM
    @mattd Thanks a lot! It was just a bit confusing but this helped
    (note that "graphcool-user-id" and "graphcool-auth-token" are just strings and do not need to be replaced by anything):
    ! I was looking at Permanent Access Tokens, thank you.
    šŸ‘ 1
  • p

    prabhjot85

    08/12/2017, 12:48 PM
    lJust started learning about Relay and facing issue with generating the graphql endpoint itself. The link never comes up šŸ˜ž
    n
    • 2
    • 1
  • p

    prabhjot85

    08/12/2017, 12:49 PM
  • m

    marcusstenbeck

    08/12/2017, 1:08 PM
    Hey I can’t query one of my data types any longer because I changed a name of one field. What do I do?
    n
    • 2
    • 6
  • f

    freddie-codogo

    08/12/2017, 1:39 PM
    Having some conectivity issues in London, anyone else?
    m
    d
    +2
    • 5
    • 12
  • m

    marcusstenbeck

    08/12/2017, 1:53 PM
    I’m creating a nested mutation, with a User and an Organisation. Since I’m curious I wondered what would happen if I passed along correct values for User but violate a unique contstraint for Organisation. What happens is that the user is created successfully, but the organisation isn’t and the mutation fails. I would expect that a mutation should only changes data in the database if the entire mutation is successful.
    n
    • 2
    • 4
  • p

    pettanko

    08/12/2017, 2:28 PM
    Reposting due to my mind being weird so deleted earlier. Anyone have ideas for changes and improvements? https://gist.github.com/DevSpeak/08709439d52b10510327e77b829b265d ( Already considering to move the endpoint to constructor )
  • n

    nikos

    08/12/2017, 3:53 PM
    Hi, how to assert text content? In relation to https://github.com/graphcool/chromeless/issues/124#issuecomment-321988250
  • m

    max

    08/12/2017, 7:46 PM
    Hey hasn't anyone else noticed that the React + Auth0 tutorial on the Graph.cool site is down? https://www.graph.cool/docs/tutorials/react-apollo-auth0-pheiph4ooj
    n
    d
    • 3
    • 2
1...305306307...637Latest