Tag: graphql-tools
-
Using batchDelegateToSchema with Schemas Containing Union Type in GraphQL Tools
0 I’m working on a GraphQL project where I have multiple schemas, and one of the schemas includes a Union type (Site) which can represent different types, such as PhysicalSite and WaitingRoom. I need to use batchDelegateToSchema to efficiently resolve the ‘sites’ field on the ‘Study’ type, which returns a SitesConnection that includes the Site…
-
Graphql federation vs schema stitching. When to pick one over the other
3 I’m new to both concepts so excuse me if it’s opinion-based. Currently, I’m looking at Apollo Federation and schema stitching provided by the graphql-tools package, though I guess it applies to similar packages. Could something like a table be created describing certain requirements/conditions to prefer one over the other? graphql graphql-tools graphql-federation Share Improve…
-
How to bundle a graphql project that uses fileloaders? for example graphql-tools
0 I am trying to bundle my graphql server using esbuild. The problem Im having is when everything is bundled together graphql-tools cant find resolvers and typeDefs due to the file running in a diffrent directory meaning a diffrent __dirname. My schema.js file: import { makeExecutableSchema } from ‘@graphql-tools/schema’; import { loadFilesSync } from ‘@graphql-tools/load-files’;…
-
Can’t import the named export XXXX from non EcmaScript module (only default export is available)
30 I have a client-server setup, in which the client(create-react-app) runs on localhost:3000 and the server is an express server which is built on node and I’m attempting to build graphql schema-resolvers setup. I’m able to import .graphql files on the server, however, on the client side, I’m using this setup by graphql-tools. When I’m…
-
How to do schema-stitching and introspection in new @apollo/server and graphql-tools?
0 I’m working on a Node.js project having a main-service(A central component where various remote microservices which are exposed with respective "port/graphql" are stitched together to create a unified API endpoint. It acts as a gateway or aggregator, allowing clients to access multiple functionalities provided by different microservices through a single entry point.). Now, I…
-
`Cannot use e “__Schema” from another module or realm.` and `Duplicate “graphql” modules` using ApolloClient
5 I have a React application with ApolloClient with Apollo-Link-Schema. The application works fine locally but in our staging environment (using GOCD), we get the following error: Uncaught Error: Cannot use e “__Schema” from another module or realm. Ensure that there is only one instance of “graphql” in the node_modules directory. If different versions of…
-
How to call sub-field in delegateToSchema
0 Schema looks like this: type Query { userManagement: UserManagementQueries! } type UserManagementQueries { users(…): UserManagementUsersConnection } … So the query looks like: query { userManagement { users(ids: [123, 456]) } } How can I call this with delegateToSchema where I can only set a fieldName? How do I call a "sub"-field? return info.mergeInfo .delegateToSchema({…