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
0 answers

Angular, GraphQL and Apollo - Post Form Data With GraphQL Subscription

I am working on an Angular app with GraphQL & Apollo that displays data from my local GraphQL API. Additionally, I am working on a form that lets users post new data to the API but I'm not sure if I'm using the correct approach here. Currently I am…
Jeremy
  • 270
  • 5
  • 19
2
votes
0 answers

Get already existing item from apollo's cache

I have a basic graphql/apollo sandbox application. The graphql server can return a list of books const books = [ { id: 1, title: "Harry Potter and the Sorcerer's stone", author: 'J.K. Rowling', }, { …
Serge Intern
  • 2,669
  • 3
  • 22
  • 39
2
votes
2 answers

Client-side query mocking with Apollo 2.0, react-apollo, and apollo-link-schema

I'd like to be able to mock out some queries on the client-side so I don't have to provide a GraphQL endpoint in order to work on my React app. According to the Apollo docs, it looks like I should be using apollo-link-schema. I've tried to follow…
Gabe Hollombe
  • 7,847
  • 4
  • 39
  • 44
2
votes
1 answer

how to add parameter in gql query

I would like to add parameter in gql query : onSubmit() { console.log(this.contact); let SendEmailQuery = gql` { sendemail(contactorFirstname:"", contactorLastname:"", contactorEmail:"", …
2
votes
0 answers

Save user Graphql Apollo Client

I am trying to save a user id to a new biz. I keep getting a 400 error and can not figure out why. I am using django for the backend with graphql and apollo client for the front with vue js. On my request the user ID is sent but for some reason…
Taylor
  • 1,223
  • 1
  • 15
  • 30
2
votes
1 answer

Authentication for GitHub API v4 with Apollo-Client

GitHub's new GraphQL API requires authentication with a token as the previous version. So, how do we add a 'Header' information into the HttpLink inside Apollo-Client? const client = new ApolloClient({ link: new HttpLink({ uri:…
user1449456
  • 502
  • 1
  • 5
  • 19
2
votes
1 answer

Corresponding graphql-tag for a schema with nested inputs?

I'm following a tutorial (here:https://www.howtographql.com/graphql-js/5-authentication/) on graphql and came across a mutation with nested inputs. How would I write the corresponding graphql-tag? gql`` Schema: type Mutation { createUser(name:…
Adrian
  • 23
  • 2
2
votes
1 answer

Update Apollo GraphQL cache without using refetchQueries?

I have a React app accessing GraphQL server with the Apollo Client (version 1.x). There is a server schema that looks like this. type Query { currentShop: Shop } type Shop { id: ID! name: String! products: [Product!]! ...etc } I do have…
FredyC
  • 3,999
  • 4
  • 30
  • 38
2
votes
1 answer

Error in run script phase: framework is a directory

I'm using the apollo framework for GraphQL that I installed using Carthage but I have an error when I run the script to generate the API.swift file during the build phase. The error is > [myproject]/Carthage/Build/iOS/Apollo.framework: is a…
Maxence
  • 23
  • 5
2
votes
1 answer

Apollo/GraphQL SSO authentication using Kerberos or NTLM

Has anyone authenticated a client using Windows integrated security from an Apollo Client? Any tips or pointers would be much appreciated
Alan
  • 93
  • 7
2
votes
1 answer

React Apollo returning Null when Graphiql and Altair succeed with exact same mutation?

I've tested this mutation on my django-graphene GraphiQL endpoint, and tested it through Altair (postman for graphql) at the exact same endpoint that my apollo client is pointed at. I run the same mutation with the same formatting, and it works with…
Evan H
  • 41
  • 8
2
votes
1 answer

How to save Draft.js data using GraphQL

I have searched high and low. But, I did found how to convertToRaw and convertFromRaw. That's great but, how to send the raw data with GraphQL? Option 1: First thing came to mind, just use JSON.stringify(..), create a GraphQLString and send it.…
Sylar
  • 11,422
  • 25
  • 93
  • 166
2
votes
1 answer

React Native: Why Does GraphQL Query With Apollo Return Undefined?

I'm currently trying to take a GraphQL query and using Apollo, display the result on my React Native app. Here is the relevant code in App.js: import {LoginScreen} from './src/Screens' import ApolloClient from 'apollo-client'; import {…
2
votes
0 answers

ReactJS/Enzyme & Jest: How to test function which calls GraphQL query or mutation?

I am trying hands on Jest & Enzyme to test ReactJs components which contains one GraphQL mutation to save record and one graphql query to fetch saved data. Mutation gets called on form submission and query data gets refetch after completion of…
2
votes
1 answer

How to "upsert" an array/nested field when issuing update mutation in Graphcool / GraphQL?

I have a Post type than has a tag field which can be associated with many Tag entries (man-to-many relationship). The issue I am running into is when updating a Post - I need to both create and associate new Tag's for tags that do not yet exist,…
Bob T
  • 318
  • 2
  • 8