Tag: graphql
-
Cross-referencing a type with Apollo Federation across multiple sub-graphs
0 I am new to Apollo Federation and I am having the following issue / question: In Subgraph A I have the following: type Product @key(fields: "id") { { id: ID! title: String } In Subgraph B I have the following: type Product @key(fields: "id") { { id: ID! related: [Product] } When I run…
-
How can I have complex dictionary type attributes
0 I’m using graphql/hotchocolate in my app and I have the following structure: public record PriorInjury(IDictionary<Location, Injure>? Injuries) public record Location(Enums.BodyPart BodyPart, Enums.Side Side, Enums.FrontOrBack FrontOrBack); public record Injure(Enums.PainLevel Level, Enums.HowOftenInjureHurts HowOften, Enums.SinceWhenInjured Since); This is my command: public record AddInjuryCommand(PriorInjury? PriorInjury) : ICommand<Guid>; This code is throwing: InputObject `PriorInjurySortInput` has no fields declared. (HotChocolate.Data.Sorting.SortInputType<PriorInjury>)…
-
Spring Boot Graphql: How can I pre-process an individual query/mutation before it runs the controller method?
0 I want to add an annotation to my controller methods that is used to check if the user can perform an action or access a piece of data before the controller method is called. I want to be able to check each individual query/mutation, rather than each http request which may come with multiple…
-
File Upload on apollo gateway
0 I have two graphql subgraphs server a and server b. Each running fastify and mercurius and using grapqql-upload to handle files. I also have an apollo gateway connected to both servers and working well for queries and mutations. However when using file upload I get a validation error. Anyone ever dealt with this ?…
-
Graphql multiple queries returns wrong data
0 I have a single grapqhl query that has multiple queries. The data returned is not correct as some of the data is mixed up. If I run the same query on graphql studio I get the desired data, however the data is wrong on the browser. query GetCarFilters { getCarModelsWithCount { …CarFilterFields } getCarMakesWithCarsCount…
-
while sending array of enum i got Error from typescript graphql nestjs api
0 Question My Stack: BE NestJS, graphQL(code first approach), prisma / FE NextJS Problem: For my model "Conventions" all fields working to send from FE to GraphQL NestJS API, but one field uses an array of an enum Called "ConGenres" i am not able to figure out why it doesnt work this way: FE (NextJs)…
-
How to use operator like geater than, less than etc in sorry-cypress graphql api
0 I wanted to filter out specific runs based on createdAt property on sorry-cypress. I was able to add the exact match via parameter. I could not figure out how to give a date range filter in the sorry-cypress graphql query. A greater than and less than operator will help. I could not find any…
-
Streaming data using HotChocolate GraphQl for .NET project – all results at once instead of one by one problem
2 I’m using C#, .NET7 minimal API and HotChocolate GraphQl. I’m trying to setup graphQl simple query endpoint which will be able to return stream like this: public async IAsyncEnumerable<string> GetDummyNumbers() { for (var i = 0; i < 10; i++) { await Task.Delay(TimeSpan.FromSeconds(1)); yield return i.ToString(); } } It works as is but even…
-
How to display graphql values in React app
0 I have a Strapi app that outputs graphql, it a list of fonts that I simple want to display on a page The page looks like this ‘use client’ import {getDataFromTree} from ‘@apollo/client/react/ssr’ import withApollo from ‘../lib/withApollo’ import { useThemeContext } from ‘./appState’ import { FontEntityResponse } from ‘@/generated’ const Home = () =>…