Questions tagged [graphcool]

GraphQL Backend Development Framework

Graphcool is a GraphQL backend framework to develop and deploy production-ready GraphQL microservices. It currently supports Node.js & Typescript and is compatible with existing libraries and tools like GraphQL.js and Apollo Server. The framework comes with a CLI and a Docker-based runtime which can be deployed to any server or cloud.

Resources

117 questions
2
votes
1 answer

GraphQL: Subscription not firing when mutation run

So, I'm testing subscriptions on Graphcool and would appreciate some clarification on how exactly they work. I have a one to many relationship from Posts on Comments: Schema type Posts { caption: String! comments: [Comments!]!…
TheoG
  • 1,498
  • 4
  • 30
  • 54
2
votes
1 answer

Apollo Client Delaying the Authorization Header

I am using Apollo (with Graph Cool), redux, and Auth0 in a React-Native app. I am trying to delay the queries and mutations until the header is set. The idToken is stored in Async Storage, and is therefore a promise. I can't use redux to pass the…
Matty
  • 277
  • 5
  • 17
2
votes
3 answers

HowTo: Increment the value of an integer based field in GraphQL

So, I wish to create a GraphQL mutation, in GraphCool, that increments the existing value of an integer field by a predetermined amount, passed in as a variable. For example: mutation updateLikes ($id: ID!, $count: Int) { updatePosts (id: $id,…
TheoG
  • 1,498
  • 4
  • 30
  • 54
2
votes
1 answer

Updating Relay store after Graphcool sign in

As part of my webapp's authentication flow, I managed to create a User in my Graph.cool backend, and now need to sign in (this is a 2-step process as discussed here). This uses the signinUser mutation, which I've set up successfully here. However, I…
2
votes
1 answer

Prevent duplicates for a certain GraphCool model

I have a GraphCool model called Student which has a field called studentNumber. How can I prevent two (or more) different Student nodes with the same studentNumber? In SQL databases I was able to create a unique index to accomplish this.
Alan Hamlett
  • 3,160
  • 1
  • 23
  • 23
1
vote
1 answer

Export and import graphcool local data through graphcool cli

I am trying to export data from a graphcool local deployment, so I can import it into another local deployment on my own server. The documentation suggests using graphcool export and graphcool import commands. However, trying to run graphcool export…
Andrei Savin
  • 2,350
  • 4
  • 26
  • 40
1
vote
1 answer

How to graphcool deploy on a shared cluster?

I'm following a quickstart on the Graphcool tutorial for a basic hello world. When I try enter "graphcool deploy" and I select a shared cluster to deploy my app, nothing happens. It just hangs there. I'm not sure how to resolve this or properly…
Hollow
  • 19
  • 4
1
vote
0 answers

Nested types in a Graphcool model

I'm trying to add a nested data structure to a model in Graph.cool, but I can't for the life if me figure out how. Essentially, this is what I want to achieve: type Invoice @model { id: ID! @isUnique user: Int! createdAt: DateTime! items:…
Ahrengot
  • 1,579
  • 1
  • 17
  • 29
1
vote
0 answers

graph.cool two way bindings

I am just starting with graph.cool, I am trying to build a graphql data modal with the help of graph.cool. It seems like we always need to make two way bindings. For example User -> Posts or Posts -> User. I made a structure like this: type User…
Sarmad Shah
  • 3,725
  • 1
  • 20
  • 42
1
vote
1 answer

firebase auth token from Graphcool

can I generate a custom auth token, for use with a third party, with a resolver in graph.cool? something like this?? type FirebaseTokenPayload { token: String! } extend type Query { FirebaseToken(userIdentifier: String!):…
roberto tomás
  • 4,435
  • 5
  • 42
  • 71
1
vote
1 answer

authenticate user and serve only their related data

I have a schema in graphcool with these nodes (not sure what the correct term is here... leaf? node? model? type??) type User @model { auth0UserId: String @isUnique createdAt: DateTime! id: ID! @isUnique userIdentifier: String …
roberto tomás
  • 4,435
  • 5
  • 42
  • 71
1
vote
0 answers

Passing Enum as variable to Relay Qraphql query

subscription userSubscription($filter: UserSubscriptionFilter!) { User(filter: $filter) { mutation node { name addresses { id pincode } } }} in this subscription query…
1
vote
1 answer

Graphcool: how to create multifield unique constraints?

I'd like to create multi field constraint. In the same way in which is possible in SQL for instance by specifying: CREATE TABLE …. UNIQUE(field1, field2); So that what is unique is the combination of fields. Is it possible to enforce this…
1
vote
1 answer

react native component receive props does not load when my screen loaded for second time

I'm using React Native Material Bottom Navigation Tabs are working Fine from one tab to another Tab., For the First time componentwillreceiveprops loads data and alert appears, But when the tabs are tapped from one to other the alert doent appears…
nikolos
  • 11
  • 2
1
vote
2 answers

GraphQL: Return a type with non-nullable id field as a query result

I have this type: type Profile { id: ID! @isUnique email: String! @isUnique ... } And a query: profile(email: String!):Profile When I run the query with a user that doesn't exist, my underlying resolver returns null and I was…
Ali Ok
  • 716
  • 1
  • 8
  • 23