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
1
vote
1 answer

GraphQL returning duplicates (that don't exist) on the front end but not the back

When using graphql sandbox to test data I query for from a MongoDB, multiple unique datapoints relevant to my query is returned, BUT when I use the same query on the front end I am given an array of one datapoint multiple times (equal to number put…
evanhu96
  • 21
  • 3
1
vote
1 answer

Next-auth with CredentialsProvider signup is partially working, but the Session returned to the client is null

I have the GoogleProvider working, and returning a valid session. But when I create a CredentialsProvider it isn't working. The credentials provider successfully creates a user in the database with graphql. And I'm able to log the returned user at…
Louis Sankey
  • 481
  • 8
  • 26
1
vote
1 answer

How to set environment variables in PowerShell to fetch a registered schema from Apollo Studio

I'm following Apollo Router Quickstart documentation. I am stuck on fetching the registered schema from Apollo Studio by setting environment variables. I'm using PowerShell and since this command is for Linux it doesn't work for windows. $…
1
vote
0 answers

Authentication in graphql

I'm trying to add authentication in graphql, so only authenticated users can make a request to my server. But when I try to send the id in the Authorization header it doesn't send the information I want. It's a next project with ssr. import {…
1
vote
1 answer

Apollo Grapql Refresh Token swift

I'm trying to build network layer using Apollo, and got one problem. I'm using tutorial from Apollo docs to refresh tokens. And they said that I should provide interceptor to handle token expired date. I did it. But I should create network request…
Sergey Udalov
  • 75
  • 1
  • 7
1
vote
1 answer

GraphQL queries/mutations only work on production when also running localhost and Apollo Client is set to localhost only

I have a website in production (https://socialvc.netlify.app/) but the queries on the page will only appear if the app is also running locally on localhost:3000. I tried to configure ApolloClient 3 ways locally only with a conditional to see if the…
fwan
  • 43
  • 6
1
vote
1 answer

GraphQL query with Apollo Client is returning an empty response

i'm trying to connect graphal after adding websocket and subscription to react but all reauest are returnin empty array with nod data here is my server.js import * as dotenv from 'dotenv' dotenv.config() import { getUser, userProtect…
sPEER PANSER
  • 13
  • 1
  • 5
1
vote
1 answer

Chunking a large GraphQL request into smaller requests

I'm using Apollo React Native client working with a query for which my request body has become too large to use (it's being rejected by our CDN for a request-too-large rule). So, I'm hoping to split/chunk this request into smaller requests and…
1
vote
1 answer

Filter data based on the response from dataloader in graphql

I have a data loader that resolves the different values of an item export const Item: ItemResolvers = { id: async (item) => item.id, weight: async (item) => { const finalItem = await dataLoader.Item.load(item.id); return…
Chandrika
  • 101
  • 1
  • 1
  • 9
1
vote
2 answers

How to nest an expression or quote in another expression or quote?

Let's say I have first <- quote(beta_a*a + beta_b*b) second <- quote(beta_d*d + beta_e*e) third <- quote(first + second) I want third to return beta_a*a + beta_b*b + beta_d*d + beta_e*e but instead it returns first + second Desired result: third >…
Victor Nielsen
  • 443
  • 2
  • 14
1
vote
0 answers

Prisma solution to avoid n+1 with findUnique performs mutiple select id from table

I am using apollo server and nexus with Prisma. I followed this guide to avoid n+1 problem: https://www.prisma.io/docs/guides/performance-and-optimization/query-optimization-performance. This is my User type: const User = objectType({ name:…
Naor
  • 23,465
  • 48
  • 152
  • 268
1
vote
0 answers

Undefined after console are homepage to see if we getting correct the data in inspect element [Solved]

The detail of the problem is that I'm not getting the data we expected within our code. We have set up the following to see within our project folder. Within webpack.config.js we set up resolve.alias in the webpack configuration, so we can include…
1
vote
0 answers

DRY: how to get a basic React/Apollo web app and python GraphQL backend API going with minimal duplication?

I'm an experienced SWE but sort of new to modern web development. I'd like to build a demo/prototype website for a startup idea with minimal time. I'd like to have the frontend tied to a backend DB store up front so it's fully functional. I'd like…
eraoul
  • 1,072
  • 12
  • 19
1
vote
2 answers

Integrating apollo server v4 with NestJS

I tried using new @apollo/server with NestJS instead of apollo-server-express. While using apollo-server-express, the apollo-server-core package is automatically used and no error is thrown. But when I remove apollo-server-express and install…
Bikrant
  • 23
  • 5
1
vote
0 answers

CORS error with GraphQL Apollo and NextJS

I'll do my best to explain my issue. I'm building a NextJS site and using Apollo to handle Graph QL, and it's been working perfectly fine when I test the API using Postman, but when I try to run in dev I get CORS errors: This operation has been…
1 2 3
99
100