Tag: graphql
-
mergeTypeDefs(allTypeDefs) does not recognize apollo federation directives @key @external
0 I have this combined typeDefs (allTypeDefs) file: ["@link(url: "https://specs.apollo.dev/federation/v2.3", import: ["@key","@external"]) scalar Date type Name { first_name: String! middle_name: String last_name: String } type Safe @key(fields: "safe_id"){ safe_id: ID! owner: User! # HAS_SAFE wallets: [Wallet!]! } type User @key(fields: "user_id") { user_id: ID! email: String! role: String! permissions: [String!]! created_at: Date! updated_at: Date! username:…
-
Rust Async Graphql Json InputObject Type
0 I’m trying to use Async Graphql, I want to use sqlx json type in model. In normal api operations the code is running. But when I want to use the async graphql InputObject macro, I get an error. The codes I used are as follows, I couldn’t find a solution for the problem. #[derive(Serialize,…
-
How can I add a variable to all requests in apollo client?
1 I need a middleware so I can pass a variable in all my requests. This is what I have, but isn’t working. const httpLink = new HttpLink({ uri: process.env.REACT_APP_BASE_URL_API }); const addVariableMiddleware = new ApolloLink((operation, forward) => { operation.variables.newVariable = "nuevavariable"; return forward(operation); }); const client = new ApolloClient({ cache: new InMemoryCache(), link: from([addVariableMiddleware,…
-
Apollo Server 4: How to Mount Koa’s Integration at the URL Path `/graphql`
0 I’m migrating from Apollo Server 3 to Apollo Server 4 and using Koa.js as my framework and @as-integrations/koa middleware. I’ve encountered an issue where I can’t configure my Koa integration to listen to the path /graphql correctly. In Apollo Server 4, the documentation states that if you want your server to listen on a…
-
Problem to export Hasura metadata – FATA[0001] failed to export metadata
0 Im trying to export the hasura metadata but i’m receiving this error after running the command hasura metadata export : FATA[0001] failed to export metadata: cannot export actions from metadata: error parsing metadata object: actions file: actions.yaml error: error in converting metadata to sdl: exit status 4: Note: If I use sudo hasura metadata…
-
Generate GraphQL schema from Ballerina GraphQL API
0 Currently, I am trying out Ballerina support for GraphQL. Is it possible for me to get the generated GraphQL schema using Ballerina? graphql ballerina Share Improve this question Follow asked 24 mins ago Kavindu Gimhan ZoysaKavindu Gimhan Zoysa 12955 bronze badges WSO2 Employee 1 Answer 1 Sorted by: Reset to default Highest score (default)…
-
Why the error `Failed to execute ‘text’ on ‘Response’: body stream already read` if I’m re-assigning res.json?
1 I’m trying to use the code I found here for APQ (automatic persisted queries) and graphql-request. But if I use the code like described: export const graphQLClient = new GraphQLClient("https://localhost:3000", { fetch: createPersistedQueryFetch(fetch), }); I’m getting this error in browser’s console: TypeError: Failed to execute ‘text’ on ‘Response’: body stream already read at getResult…
-
Headless WordPress GraphQL endpoint results in 404 URL not found with XAMPP
1 I am trying to consume a GraphQL endpoint (autogenerated from a headless WordPress project) which is served over XAMPP Apache localhost server, but when I hit the endpoint with suggested from the GraphQL settings in WordPress (https://localhost/does-pizza/graphql) I get back a 404 URL not found. Some details that could be useful to anybody trying…
-
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’;…
-
Building GraphQL, TypeScript, and Node project with tsc
0 I am trying to build a GraphQL project with tsc but am unable to solve an issue I have referenced this issue. However, when I run npm run build and npm run start the error states that Error: Cannot find module ‘./DomainOne/schema.graphql’ This is because in the dist folder, the dist/GraphQL/index.js still has imports…