https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# random
  • m

    matty

    07/26/2017, 8:31 AM
    Trying to call createUser and getting: "The provided idToken is invalid. Please see https://auth0.com/docs/tokens/id_token for how to obtain a valid idToken"
  • m

    matty

    07/26/2017, 8:31 AM
    it should be a valid idToken though - I am using latest version of auth0.js and calling
    signupAndAuthorize
  • n

    nilan

    07/26/2017, 8:31 AM
    There are two possible causes: - the token is RS256 and not HS256 - your client domain/client id/client secret entered in the Graphcool integration panel does not match the client id/client domain in your app
  • m

    matty

    07/26/2017, 8:31 AM
    in the network traffic I can see it hitting
    /oauth/token
    to swap username/password for an idToken
  • n

    nilan

    07/26/2017, 8:32 AM
    paste the token to jwt.io to see if it is HS256 or RS256.
  • m

    matty

    07/26/2017, 8:33 AM
    Ah thank you. its RS256, even though my auth0 client is setup to sign with HS256. Will chase up Auth0 and see what's happening
  • l

    lewisblackwood

    07/27/2017, 9:53 AM
    hey all 👋 love the work you're doing with Chromeless! 💚 I have some questions around how Graphcool, and the community, handle their AWS Lambda development. When I started using Lambda, I could immediately see the value but found a lack of productive developer experience. Then I found Serverless (https://serverless.com/), which has delivered a big productivity boost when working with Lamdba ⚡ I noticed your Chromeless proxy service (https://github.com/graphcool/chromeless/tree/master/serverless) is also using Serverless. I've also found some really useful starter kits for Serverless recently, such as
    serverless-babel-starter
    (https://github.com/postlight/serverless-babel-starter). It adds Webpack, Babel, Prettier, and Jest by default and other helpers such as live-reloading of functions locally and the ability to keep functions "warm". As I imagine Graphcool is a Lambda power user, I'd love to hear more about how you guys manage your Lambda development: • are you using Serverless elsewhere, or just for running integration tests with Chromeless? • how do you manage the development and deployment of Lambda functions, across multiple environments? • are you doing CI/CD with your Lambda functions? • any tips in general on building a great dev experience with Lambda 😅 thanks team!
    s
    • 2
    • 2
  • m

    michaelsbradleyjr

    07/27/2017, 9:30 PM
    Any dev/support remote-work opportunities at Graphcool?
    j
    • 2
    • 1
  • c

    corefinder

    07/28/2017, 8:10 AM
    Hello all. Pretty awesome with the work on the tool. Just a query. Is there anyway that I can bind chromeless to python ? I mean to say get chromeless to execute headless where as if we could bind the driver object of Selenium with chromeless to get the tests executed. Is that possible ? It would be great if we could do that because it is comapratively easier to run chrome headless on Mac through Canary but I havent made any success on running tests on headless on linux platform
  • s

    shadoeblade184

    07/30/2017, 8:24 AM
    Hello everyone can someone clarify if using github api with graphcool in react is possible?
  • m

    martin

    08/02/2017, 7:40 PM
    “Value your customers, hire well, find a market that isn’t being served, and realize that someday I will utterly crush you.” 🤣 http://www.theonion.com/blogpost/my-advice-anyone-starting-business-remember-someda-56539
    😂 1
    c
    • 2
    • 3
  • m

    martin

    08/04/2017, 6:11 PM
    Just came across this… since graphcool is such an interactive community, perhaps it’ll be useful. https://canny.io/
    👍 1
  • i

    ilija_nl

    08/06/2017, 7:31 AM
    Hello guys, i am developing a chat app with graphql subscriptions and i am using websockets for the pub/sub system. However when the phone looses websocket connection with the server, no messages are received. What should be done to receive all the missed messages whenever the connection reastablished
    a
    • 2
    • 12
  • j

    jensandersson

    08/06/2017, 10:54 AM
    There are no composite unique constraints right?
  • k

    kevinbrown

    08/06/2017, 11:17 AM
    Say I have an account with transactions, each of which has a date associated. Is there a way to query the account and get a sorted set of transactions under the account? From this page it looks like I’d have to do
    allTransactions
    then filter and sort there. Is that correct? https://www.graph.cool/docs/reference/simple-api/ordering-by-field-vequoog7hu/
  • j

    joar

    08/06/2017, 11:23 PM
    I dont think that’s correct @kevinbrown. You should be able to just do
    Copy code
    { 
      user { 
        transactions(orderBy: “date”) { id } 
      }
    }
  • m

    mj

    08/07/2017, 8:18 AM
    Hi I’m super confused over permissions
  • m

    mj

    08/07/2017, 8:18 AM
    Say I have an account and a user many - to - many relationship
  • m

    mj

    08/07/2017, 8:19 AM
    Copy code
    type Account implements Node {
      name: String!
      id: ID! @isUnique
      v1Id: Int @isUnique
      createdAt: DateTime!
      updatedAt: DateTime!
      logo: AccountLogo @relation(name: "LogoOnAccount")
      fields: [CustomField!]! @relation(name: "CustomFieldOnAccount")
      fieldsMeta: [String!]
      contact: [Contact!]! @relation(name: "ContactOnAccount")
      event: [Event!]! @relation(name: "EventOnAccount")
      location: [Location!]! @relation(name: "LocationOnAccount")
      user: [User!]! @relation(name: "UserOnAccount")
    }
    
    type User implements Node {
      firstname: String!
      lastname: String!
      createdAt: DateTime!
      id: ID! @isUnique
      v1Id: Int @isUnique
      updatedAt: DateTime!
      siteId: Int
      account: [Account!]! @relation(name: "UserOnAccount")
      email: String @isUnique
      password: String
    }
  • m

    mj

    08/07/2017, 8:19 AM
    I want to be able todo allUsers and allAccounts without getting permission errors
  • m

    mj

    08/07/2017, 8:20 AM
    This is the permission I have set to Account read:
    Copy code
    query ($user_id: ID!, $node_id: ID!) {
      SomeUserExists(filter: {
        AND: [
          {
            id: $user_id
          }, {
            account_some: {
              id: $node_id
            }
          }
        ]
      })
    }
  • m

    mj

    08/07/2017, 8:21 AM
    Copy code
    query {
    	allAccounts {
        id, 
        name
      }
    }
  • m

    mj

    08/07/2017, 8:21 AM
    Copy code
    Insufficient Permissions
    😞
  • a

    antho1404

    08/07/2017, 8:27 AM
    From what I understood you need to filter your query with something like that
    Copy code
    query($currentUserId: ID!) {
      allAccounts(filter: {
        user {
          id: $currentUserId
        }
      }) {
        id, 
        name
      }
    }
    Your request retrieve all the accounts even the one you your user don’t have access to but when you try to read the value it’s in conflict with your rules. At least that’s what I did in my application but I still have some kind of random
    Insufficient Permissions
    sometimes on the creation but for the reading it works like a charm.
  • m

    mj

    08/07/2017, 8:30 AM
    I guess I can hold the user id somewhere and use it in every query
  • m

    mj

    08/07/2017, 8:30 AM
    feels like the $user_id isn’t used in someway on the permissions
  • m

    mj

    08/07/2017, 8:30 AM
    ^ this creates noise in my code
  • m

    mj

    08/07/2017, 8:31 AM
    like to be able to do a list all accounts without variables
  • a

    antho1404

    08/07/2017, 8:37 AM
    I think you can also simplify your permission with
    Copy code
    query ($user_id: ID!, $node_id: ID!) {
      SomeUserExists(filter: {
          id: $user_id
          account_some: {
            id: $node_id
          }
      })
    }
    And yes I agree it could be perfect to fetch all the data associated to the connected user but I guess less flexible
    👍 1
  • m

    mj

    08/07/2017, 9:21 AM
    me again! any ideas on how to do a bulk create?
    Copy code
    mutation CreateAccount(
        $name: String!,
        $v1Id: Int!,
        $contact: [AccountcontactContact] ) {
    		createAccount(
    			name: $name
    			v1Id: $v1Id,
          contact: $contact
    		) {
    			id
    		}
    	}
    Variable ‘$contacts’ of type ‘[AccountcontactContact]’ used in position expecting type ‘[AccountcontactContact!]‘. (line 11, column 5):\n $contacts: [AccountcontactContact] ) {\n ^\n (line 15, column 16):\n contact: $contacts\n
1...789...53Latest