0 We are using Spring boot grphql sqpr library. We have to generate graphql API documentation which can be viewed in graphiql. For e.g. If i have field like below # comma separated location IDs. (eg: ‘5,12,27’) locationIds: String then this string comma separated location IDs. (eg: ‘5,12,27’) should be visible in graphiql. graphql graphql-spqr […]
2 I am having trouble parsing the header retrieved from graphql’s context, what I would like to do is to basically forward the headers from the request into the response My gateway: GraphQLModule.forRootAsync<ApolloGatewayDriverConfig>({ driver: ApolloGatewayDriver, inject: [ConfigService], useFactory: async(configService: ConfigService) => ({ server: { introspection: true, playground: true, cache: ‘bounded’ }, gateway: { buildService: (url) […]
0 Requirement: Create a custom hook (useLoggedAPI) to call either useQuery or useMutation and add logs for request or errors. This utility function will be reused everywhere where there’s an GQL API call. What I have tried so far: /* eslint-disable @typescript-eslint/no-explicit-any */ import { useQuery, useMutation, AnyVariables, UseQueryArgs, DocumentInput, CombinedError, UseQueryResponse, UseMutationResponse, } from […]
0 I have a GraphQL API, but I have doubts about whether to login in a graphql mutation or do it in a REST endpoint, I know that it can be done in both ways. Any comments? I have read and even in some courses I heard that for the login the ideal is to […]
2 There’s a situation where there are two possible types to fill data property. I have made a union type for that (ComponentItem) to determine which field needs to be returned. The first schema (ComponentItem1) should just be a hardcoded list but the second one (ComponentItem2) is more dynamic where it gets a searchTerm from […]
1 I’m working on a project where I have posts that are created and shown on a screen. I’ve done this using graphql subscriptions for real time updating of posts, but I need the user to also be able to delete their own posts and for that update to be shown in real time. The […]
0 Anyone please helppppp!!! I am trying to use TMDB movie api to post a rating, check out the link here for their docs:https://developer.themoviedb.org/reference/movie-add-rating, however i face an issue that it keeps showing me the below error when i implement to Graphql code for Mutation, how do i solve it: "errors": [ { "message": "String […]
0 I suppose its because of cache? But i have Query01 that i trigger using a button click, and Query02 that had run previously, when Query01 runs, it reruns query 02. What is going on?? Here’s the structures: query Query01( $patientId: Something! $externalId: String $externalEncounterId: String! ) { patient(patientId: $patientId) { pastMedicalHistory {} prescriptions {} […]
0 Before I could get the context using startStandaloneServer but now I have to use a websecket and I’m not getting the token how is the file server.Js import { ApolloServer } from ‘@apollo/server’; import { createServer } from ‘http’; import { expressMiddleware } from ‘@apollo/server/express4’; import express from ‘express’; import { ApolloServerPluginDrainHttpServer } from […]