Tag: graphql
-
Data is not displayed at front end react with graphql queries at node.js backend
0 import { gql } from ‘@apollo/client’; const GET_CLIENTS = gql` query getClients { clients { id name email phone } } `; export { GET_CLIENTS }; import {gql} from ‘@apollo/client’; const DELETE_CLIENT = gql` mutation deleteClient($id: ID!) { deleteClient(id:$id) { id name email phone } } `; export {DELETE_CLIENT}; import React from ‘react’; import…
-
Federated Graphql in case of list of items
0 I have defined Subgraphs as below and data is fetched from multiple sources Subgraph A type Query { getAllItems(type: String!) : AllItems } type AllItems{ type: String response: QueryResponse items: [Item!]! pageInfo: Page totalCount: Int } type Item @key(fields: "id") { val1: String val2: String id: ID! } SubgraphB type Item @key(fields: "id") @extends…
-
How to load a .graphql file using `apollo-server`?
35 I am currently loading the GraphQL schema using a separate .graphql file, but it is encapsulated within strings: schema.graphql const schema = ` type CourseType { _id: String! name: String! } type Query { courseType(_id: String): CourseType courseTypes: [CourseType]! } ` module.exports = schema Then using it for the apollo-server: index.js const { ApolloServer,…
-
How to merge application resolvers with dynamic resolver in NestJS using ApolloFederationDriver
0 I am developing an application that requires dynamic schema using NestJS and the Apollo GraphQL module that comes integrated with it. To achieve this, I am creating type definitions and resolvers based on user configuration. Everything works correctly when I use the ApolloDriver, but when I switch to the ApolloFederationDriver, problems arise. Let me…
-
Catch apollo client errors when using errorLink
0 I’m using Apollo error link to handle graphQL errors. In most cases, I would only want to catch the error and show an alert, which is something I can easily to when defining onError, but in one of my views I’m running a mutation call and there I would like to catch the error…
-
AWS Amplify and Flutter: Parsing Issues with Nested GraphQL Query Results
0 I am trying to execute a simple GraphQL query in my Flutter project. The goal is to get a list of customers with a nested list of devices. However, the results are not being parsed properly and i found some inconsistency between appsync and my project appsync calls. I am pretty new to aws…
-
Circular Import Strawberry
0 Hi I am trying to make a GraphQL API using FastAPI and Strawberry and could not figure out how to do this. Essentially here is my problem: I have one model (call it Department) that has a one to many relationship with the Employee model, so that department.employees is the list of all employees…
-
GraphQL pagination limit parameter
0 How many rows should GraphQL query return when limit = 0, all rows or 0 rows ? Looks like this is not mentioned anywhere. https://developers.facebook.com/docs/graph-api/results/ graphql Share Improve this question Follow asked 2 hours ago user2018791user2018791 1,1431515 silver badges2929 bronze badges 1 The API you reference is Facebook's "Graph API". While Facebook is also…