Questions tagged [apollo]

Apollo is a GraphQL client and cache for JavaScript, iOS (Swift) and Android.

Apollo is a flexible, fully-featured client for every platform.

Apollo is made up of a family of technologies you can incrementally add to your stack: Apollo Client to connect data to your UI, Apollo Engine for infrastructure and tooling, and Apollo Server to translate your REST API and backends into a GraphQL schema.

It has implementations for JavaScript, iOS and Android. The JavaScript client has integrations for React, Angular, Vue.js, Ember.js and more.

Apollo is fully compatible with any server that implements the GraphQL specification.

4536 questions
2
votes
1 answer

Query works in GraphiQL but returns empty array in Actual Code while using React Apollo

I have a simple query like this import gql from "graphql-tag"; export const GET_TODOS_BY_PRODUCT = gql` query getTodosByProduct( $id: ID! $completed: Boolean = false $limit: Int = 100 ) { product(id: $id) { hashtag …
deadcoder0904
  • 7,232
  • 12
  • 66
  • 163
2
votes
1 answer

Apollo Playground on remote server

When I install the Apollo Server 2 dependencies, follow the quickstart, and spin up a local server - I see the GraphQL Playground on local host However, when I deploy the same exact code to a remote server, and visit the url, I see "GET query…
davidkomer
  • 3,020
  • 2
  • 23
  • 58
2
votes
1 answer

How to build Xcode iOS project using Apollo framwork to work with GraphQL

I am working on an Xcode project that connects to a GraphQL API. To do this, I'm using the Apollo framework . In my project, I've installed the cocoapod that includes the Apollo framework, and then added the following run script in Xcode: if which…
syedfa
  • 2,801
  • 1
  • 41
  • 74
2
votes
2 answers

ApolloGraphql FileNotFoundException: source/apollo/generatedIR/debug/src (Is a directory)

I am trying to add ApolloGraphql to my android project, but when i try to rebuild the project, i get : org.gradle.api.UncheckedIOException: java.io.FileNotFoundException:…
2
votes
1 answer

How to access the state of apollo (GraphQL) query triggered by click event

In vue application I need to run gql query when user clicks the button. So the HTML part has the button:
 
And the corresponding function is doing some debug…
John Overiron
  • 517
  • 1
  • 5
  • 20
2
votes
2 answers

How to send a GraphQL Query from Node.js to Prisma

I just learnt how to create a GraphlQL server using graphql-yoga and prisma-binding based on the HowToGraphQL tutorial. Question: The only way to query the database so far was to use the Prisma Playground webpage that was started by running the…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
2
votes
0 answers

How do I perform a mutation with the guarantee that the subscription is ready?

Previously, in the GraphQL protocol there was a special message confirming the subscription: SUBSCRIPTION_SUCCESS (server -> client). Now it is deprecated: here in apollographql and here in prismagraphql. Why is it no longer necessary? I am…
2
votes
1 answer

Can't transform/normalize/modify response of GraphQL query - Apollo Client

Anyone had experience with an afterware that modifies the response data? const parseResponse = new ApolloLink((operation, forward) => { return forward(operation).map((response) => { response.data.parsed = transformData(response.data) …
Rafael Sales
  • 326
  • 5
  • 8
2
votes
2 answers

GraphQL HOC messes with ref to children | React

I am using React and Apollo for my project. I got this in my component MenuModal: onClick = () => { console.log(this.child) this.child.onSubmit(); // do stuff }; render() { return (
Martin Nordström
  • 5,779
  • 11
  • 30
  • 64
2
votes
1 answer

Update apollo client with response of mutation

I have a login component that when submitted, calls a login mutation and retrieves the user data. When the user data is returned, I want to set the apollo client state but I am confused by the docs on how to do so: My component looks as so: const…
Stretch0
  • 8,362
  • 13
  • 71
  • 133
2
votes
1 answer

How to enhance the response in apollo client with react only once

I make a GraphQL query where I get back a lot of data and than I calculate the min and max values. As the calculating is quite time consuming I would like to only do it when I receive the value. Unfortunately the props method is called every time…
Andreas Köberle
  • 106,652
  • 57
  • 273
  • 297
2
votes
0 answers

rxjs pagination with subscription to each page

We are querying graphql over websocket to have a subscription to a list of entities. We use pagination as the list is supposed to be scrollable indefinitely. We also want to see changes made in db in real time in the list on the front-end. This list…
Ced
  • 15,847
  • 14
  • 87
  • 146
2
votes
1 answer

Apollo makeExecutableSchema throws error "Cannot read property 'kind' of undefined"

I am trying to do schema stitching with apollo but I am getting an error every time I use makeExecutableSchema. The error is the following: ../node_modules/graphql-tools/dist/generate/concatenateTypeDefs.js:9: -> if (typeDef.kind !== undefined)…
Jacob Arvidsson
  • 618
  • 7
  • 13
2
votes
1 answer

How to extends schema in graphql-compose

I am using the graphql-compose library. I am using the type composer to create classes and add it to schema composer and it builds the schema. How to add (merge) another schema to schema composer? Or How to create an executable schema and add…
fl-web
  • 462
  • 5
  • 16
2
votes
3 answers

Updating uri of apollo client instance

I'm using Angular Apollo for one of our project. I'm creating the apollo client as: this.apollo.create({ link: this.httpLink.create({ uri: `${environment.apiBase}/graphql?access_token=${this.tokenService.token}`}), cache: new InMemoryCache() …
Manzur Khan
  • 2,366
  • 4
  • 23
  • 44