Tag: graphql
-
Complex type in Netflix dgs entityfetcher
0 I have defined Subgraphs to fetch data from multiple sources type MyResult{ id: ID innerResults: [InnerResult] @external otherResults: [OtherResult] @requires(fields: "innerResults") } DgsEntityFetcher looks like below @DgsEntityFetcher(name = DgsConstants.MYRESULT.TYPE_NAME) public DataFetcherResult<MyResult> getResults(Map<String, Object> values) { values.forEach((k,val) -> log.warn("key {} value{}",k,val)); return DataFetcherResult.<MyResult>newResult() .data(PlacedDeviceResult.newBuilder().Id((String)values.get("id")).innerResults((List<InnerResult>) values.get("innerResults")).build()) .build(); } But this is not working giving exception java.util.LinkedHashMap…
-
http-proxy-middleware and graphql
0 I have a simple graphql-server: const typeDefs = gql` type Message { id: ID! text: String! } type Query { getMessage: Message } `; const resolvers = { Query: { getMessage: () => { return { id: ‘1’, text: ‘Hello, World!’ }; } } }; async function startServer() { const server = new ApolloServer({…
-
Graphql: “message”: “ID cannot represent value: 5a72240cf31713598588b70f”
7 I use moongose for work with mongodb on nodejs based app. Currently, I try to implement Grapqhl based API. My query graphql schema looks like: const schema = buildSchema(` type Query { predictionModels(active: Boolean): [PredictionModel] }, type PredictionModel { _id: ID title: String active: Boolean } `) but when I use: query { predictionModels(active:…
-
Gunicorn flask application throw mysql database connection timed out
0 I have a python flask application, where we upload a csv file and creating a graphql endpoint based on csv file header names. in order to retrieve the data, we are sending post request to graphql endpoint with a graphql query to retrieve the data. My python flask application is running with gunicorn server…
-
How do I implement GraphQL subscription in ASP.NET Core Web API using Graphql.net library?
0 I’m currently working with GraphQL version 7.6.1, graphql.server.transport.websockets version 4.4.1, and graphql.server.transport.aspnetcore version 7.6.0, and I’m struggling to find up-to-date documentation or examples for adding subscriptions to my ASP.NET Core Web API. I attempted to implement subscriptions based on older examples, but due to changes in syntax and other aspects, I’m encountering errors that…
-
Error Configuring GraphQL Subscriptions in ASP.NET Core
1 I am encountering an issue while configuring GraphQL subscriptions in my ASP.NET Core web api. I have followed the documentation and examples, but I’m receiving an error that I can’t seem to resolve. app.UseWebSockets(); app.UseGraphQLWebSockets<GraphQLSchema>("/graphql"); app.UseGraphQL<GraphQLSchema>(); Severity Code Description Project File Line Suppression State Error CS0012 The type ‘ISchema’ is defined in an assembly…
-
How to define type for object in graphql schema?
-2 I have todo’s mongo schema like this: const todoSchema = new Schema( { userId: { type: String, required: true }, title: { type: String, required: true }, due_date: { date: { type: Number }, month: { type: Number }, year: { type: Number }, hours: { type: Number }, minute: { type: Number },…
-
Using GitHub GraphQL API to Query Filtered Items in ProjectV2 by State
0 I’m attempting to use the GitHub GraphQL API to query filtered items in ProjectV2 based on their state. Here’s what I have so far, but I’d like to filter items in Issues or Pull Requests with a state of CLOSED or MERGED, or based on their milestone. Any help would be greatly appreciated. query…
-
Make a mutation call in angular (getting “Http failure response for https://localhost:8080/graphql: 400 Bad Request”)
0 Im new to both GraphQL and angular im trying to follow the documentation but not able to make a mutation. Below is the ts file code export const USER_SIGNUP = gql` mutation AddUser($userInput: UserInput) { addUser(userInput: $userInput) { id name email password } } `; import { Component } from ‘@angular/core’; import { Apollo…