1 Background My spring-boot-3 application need to get data from external GraphQL API. There I can/need fetch data by 4 different queries. I want to find some generic GraphQL Client with default GraphQL exceptions handling and default response conversion to objects. Question Is there any simple way to call GraphQL API? Any dependency or client […]
0 I came across this issue called module cycles when requiring modules. Im working on a small star wars graphql api and ill explain in short where i got the issue : I have two type : filmType and charecterType: film.js: const axios = require("axios"); const { GraphQLObjectType, GraphQLString, GraphQLInt, GraphQLList, } = require("graphql"); const […]
-1 I have tried sending 404 status using json-server and it works with postman as seen below. But when I’m doing it inside apollo sandbox, it’s giving me this invalid doctype. Not sure why json-server is sending out html instead of json content type because I’ve already set it Here is the json-server Here’s my […]
0 I started moving my REST API endpoints to using GraphQL with Graphene. Seems pretty straightforward so far, but one of the things that I like about the REST API (and I cannot figure out in Graphene) is the structure of "endpoints" for each app. I have a lot of apps in my Django application, […]
0 I have problems getting local-only fields via typePolicies to work in my app. My setup is the following: This is one of my queries: export const GET_ALL_DEBT_TOKENS = gql` query GetDebtTokens { getDebtTokens { totalSupplyUSD totalReserve totalReserve24hAgo token { address symbol priceUSD @client priceUSD24hAgo } } } `; And this is the config to […]
0 I am building an ASP.NET Core Web API with GraphQl, but I am facing issues with JWT token authentication. When the user is logged in I am returning the token, but when I want to create a query or mutation with token provided I see message The current user is not authorized to access […]
0 I am using GraphQL and react on my client side project but I am not using a state management system like Redux I have organised my api calls into custom hook files like below const [getSomeData, { data: getSomeDataData, loading: getSomeDataLoading, error: getSomeDataError }] = useLazyQuery( GET_SOME_DATA2, { client: dataClient, fetchPolicy: "cache-and-network", nextFetchPolicy: "cache-first", […]
0 I was scanning over the graphql docs to find express-graphql deprecated so I decided to implement the recommended graphql-html version: this is my server.js: import { createHandler } from "graphql-http/lib/use/express"; import { buildSchema } from "graphql"; import http from "http"; import fs from "fs"; import path from "path"; const __filename = new URL(import.meta.url).pathname; const […]