Questions

  • How to pass request headers when using java netflix graphql client?

    0 I am using com.netflix.graphql.dgs:graphql-dgs-client:4.9.16 along with HttpClient (JDK 17) I am creating graphql client using below. GraphQLCLient graphQLClient = GraphQLClient.createCustom( host-url, requestExecutor::exec); And my request executor is based on HttpClient and it’s implementation is roughly as below – import com.netflix.graphql.dgs.client.HttpResponse; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpClient.Version; import java.net.http.HttpRequest; import java.net.http.HttpRequest.BodyPublishers; import java.util.List; import java.util.Map; […]

  • Cypress stub ‘ECONNREFUSED 127.0.0.1:3000’ error

    0 I have a website that sends queries to the server using ‘Apollo graphql client’. I have set up an interface that will be displayed when this website cannot connect to the server, i.e. when it gets an error ‘Error: connect ECONNREFUSED’. I can test this manually by shutting down the server. I want to […]

  • Possible abuse of GraphQL Mutations

    0 I want to pose a question that has been bothering me for quite some time. A project I am working on has decided (some time ago) to use a UI written in React that communicates with the backend ONLY using GraphQL query/mutations (with all the various Redux, RTK, etc). Now, as long as it’s […]

  • How to get all comments in a group filtered by author?

    0 I have the following query { group(fullPath: "X") { issues { count } projects { nodes { name issues(sort: CREATED_DESC, state: opened ) { count edges { node { iid title description notes { nodes { id body author { name } } } } } } } } } } It gives me […]

  • Remove read-only fields before mutation in GraphQL

    10 I’ve got a type called Article in my schema: type Article { id: ID! updated: DateTime headline: String subline: String } For updates to it, there’s a corresponding input type that is used by a updateArticle(id: ID!, article: ArticleInput!) mutation: input ArticleInput { headline: String subline: String } The mutation itself looks like this: […]

  • NestJS + GraphQL: How to avoid circular dependencies in resolvers

    2 Let’s say i have two entities: // user.entity.ts @ObjectType() @Entity() export class User { @Field() @PrimaryGeneratedColumn(‘uuid’) id: string; @Field() @Column({ unique: true }) username: string; @Column({ select: false }) password: string; @Field(() => [Task]) @OneToMany(() => Task, (task) => task.author) authorOfTasks: Task[] } and // task.entity.ts @ObjectType() @Entity() export class Task { @Field() @PrimaryGeneratedColumn(‘uuid’) […]

  • How to do HTTP-Only Cookie based authentication using flutter and graphql api

    0 I am currently using graphql_flutter: ^5.1.2 for fetching Graphql api. On the host server there is used httponly cookie based authentication. In react there is http only option for cookie but on graphql_flutter i can’t find any option like that . I already test this system using dio client . But it doesn’t work […]

  • Multi Level Query with GraphQL

    0 I have 2 data tables: Project and Reason. Each Project with a unique ID has a bunch of reasons tied to it with their own unique ID. ProjectId is a foreign key to Reason. I want to pull up a single Reason with a given ProjectId and a ReasonId, but ReasonId exists in the […]

  • Typegraphql field that can be generic for any custom type

    0 I have a typegraphql base interface and want to be able to have object types use this class with their own relationship/attribute types. Is there a way to create a custom type that accepts any typegraphql objecttype? @InterfaceType() export abstract class BaseObjectType { @Field(type => ID) id: string; @Field() type: string; @Field() relationships?: any; […]

  • How to stream file upload using python gql client for GraphQL

    0 I am using python gql client to upload files using GraphQL request as below: https://gql.readthedocs.io/en/latest/usage/file_upload.html I am using asynchronous transport transport = AIOHTTPTransport(url=’YOUR_URL’) async with Client(transport=transport) as client: query = gql(”’ mutation singleUpload($file: Upload!) { singleUpload(file: $file) { id } } ”’) async def file_sender(file_name): async with aiofiles.open(file_name, ‘rb’) as f: chunk = await […]