Tag: graphql
-
How to define JSON custom scalar type in graphql which can be nullable?
0 https://github.com/graphql/graphql-js/issues/3532#issuecomment-1125126566 serialize() can not return null, so I’m getting GRAPHQL error {"errors":[{"message":"Expected JsonType.serialize("null") to return non-nullable value, returned: null" error where JsonType is my customized scalar. tried to return undefined but it’s not working either. graphql graphql-js Share Follow asked 28 mins ago user22803426user22803426 1 New contributor user22803426 is a new contributor to this…
-
gqlgen: Code Generation Fails When Binding Types: “Unable to bind to interface”
0 I am facing an issue with gqlgen’s code generation in my Go project. I have a GraphQL schema and a Go interface where I’m trying to bind a type CourseProduct to a Go struct. However, I’m encountering an error during the code generation process. Here’s a snippet of my GraphQL schema: interface Product @goModel(…
-
Issue with GraphQL Kestrel API server C# ASP.NET Core 7
0 Here’s the issue: I have an ASP.NET Core 7 Web API listening on https://localhost:5248/sap/opu/odata/GIBSFI/ALERT_SRV, but when a request comes in, it needs to run the request to on https://localhost:5248/sap/opu/odata/GIBSFI/ALERT_SRV/graphql and return the results. Keep in mind this is a piece of middleware and I can not alter the URL the other app is submitting…
-
Add appsync as subgraph to apollo graphql supergraph
0 I have apollo supergraph created with two subgraphs working perfectly. I have used Rover commands to join subgraphs with supergraph. Now I’m trying to add appsync as a subgraph to my supergraph. I have changed in the appsync schema as required apollo. Using rover command i have joined appsync as subgraph. I’m able to…
-
Unknown type “” in grapthqls files with GraphQL in Intellij
0 I have created multiple graphqls files with multiple types but the Intellij will not recognize the types when used. !Important: No error was thrown at compile time and the queries works as expected but visually is very annoing to have everything in red In the next image you can see that i have the…
-
Hasura query nullable variable
0 I am trying to get superior id one by one from my database, but the last one will be allways nullable and i don´t know how to be able to ask in Int type varible for null value. I tried this query which function untill i use the null value. query GetSortHierarchy($device_id: Int!, $filter_id:…
-
Must a GraphQL field be a Query type to be mentioned in a query?
1 Say I have this GraphQL query: query GetUser($user_id: Int) { user(user_id: $user_id) { name } groups(user_id $user_id) { name } } This query recieves user id, and returns: user’s name names of all the groups this user belongs to I know that user should be defined in the SDL like this: type Query{ user(user_id:…
-
Spring Boot Starter GraphQL LazyInitializationException
0 I am currently implementing GraphQL into a system and am using Spring Boot 3.0.5 together with org.springframework.boot:spring-boot-starter-graphql to implement GraphQL schemas and queries. However there is a query that has issues. The relevant JPA entities: @Entity public class Video { @Id @Column(length = 24, nullable = false) private String videoId; @ManyToMany(mappedBy = "video") private…
-
Why I got error: Cannot query field xx on type “Query”?
57 Although I copied and pasted the graphQL query from the GraphiQL tool after I tested it at GraphiQL successfully , the query returned with an error when I tried it in Apollo client within a reactJS app: [GraphQL error]: Message: Cannot query field “allStudents” on type “Query”., Location: [object Object], Path: undefined Here is…