Questions

  • nestjs module is not injected properly

    0 I created new module in nest using the command nest g module UserModule src/user-module/user.resolver.ts is – import { Query, Resolver } from ‘@nestjs/graphql’; import { UserService } from ‘./user.service’; export class UserResolver { constructor (private readonly user: UserService) { this.user = user; } @Query(‘users’) async users() { return this.user.getUsers(); } } then src/user-module/user-module.module.ts is […]

  • Graphqlresolver for common subfield under different parent field type

    0 I am new to graphql, I have requirement where multiple different types have the same field which I am fetching from downstream call, can you please suggest how I can write the graphqlresolver for this subfield? { Type1 { title Field1 }, Type2 { Field1 } } here Field1 value I will be getting […]

  • NextJs update GraphQL pagination limit with Apollo Client

    0 I would like to update my exisiting Graphql Query to create a infinite Scroll in NextJs. But I don’t know how to setup the update Function for the pagination limit. What I have know: Apollo Client: import { ApolloClient, InMemoryCache } from "@apollo/client"; const client = new ApolloClient({ uri: process.env.API_ENDPOINT, cache: new InMemoryCache(), }); […]

  • How to get file image url in graphql for a Metaobject

    0 I am using StoreFront API call to get Metaobject entries. One of the fields is of a type file (image). When I call the GRAPHQL with below call. I am getting all the fields but getting image as gid reference. I wan actual cdn url which I am not able to find anywhere in […]

  • Read cache from a different request field

    0 With React Native and Apollo client, I am am trying to properly write and read cache from a different request field. I basically ave two object types : ‘User’ & ‘Event’, and I have those " requests : All the events : (Event List screen) events { id numberOfParticipants } Connetced user with events […]

  • How to pass specific key from `$data` into the nested graphql query?

    0 There are publications and tags with many-to-many relations. Here’s schema.gql: input GetPublicationsDto { cursor: Int take: Int tagIds: [Int!] tagId: Int … } input GetTagsForDto { tagIds: [Int!] tagId: Int } type Query { publications(data: GetPublicationsDto!): [Publication!]! tagsFor(data: GetTagsForDto!): [Tag!]! } We see that GetPublicationsDto extends GetTagsForDto. Suppose we want to get publications by […]

  • Localhost Connection Interruption Issue with Express Server and Firebase Functions

    0 I want my phone, on the same Wi-Fi as my computer, to access my computer’s Express server at its localhost. In the past, I used ngrok or a proxy on my web server to achieve this, but it was complex and costly. Now, I’ve set up a direct proxy on my Express server to […]

  • NexusJS Error: TypeError: Class constructor GraphQLNonNull cannot be invoked without ‘new’

    1 I was trying to learn nexus, but got a problems. I created index.ts file with this code: const User = objectType({ name: ‘User’, definition(t) { t.id(‘id’) t.string(‘name’) } }) export const schema = makeSchema({ types: [User], outputs: { typegen: __dirname + ‘/generated/nexus.generated.ts’, schema: __dirname + ‘schema.graphql’ } }) Then I tryied to run script: […]

  • Multi-looping with gitlab Graphql API

    0 Im trying to get list of all the pipelines and all the jobs from Gitlab that ran in a day using graphql API, Here is the query I have query = """ query($projectPath: ID!, $pipelineCursor: String, $jobCursor: String) { project(fullPath: $projectPath) { pipelines(updatedAfter:"2023-09-06T00:00:00Z",updatedBefore:"2023-09-06T23:59:59Z",status:SUCCESS,first: 100,after: $pipelineCursor,source:"pipeline") { pageInfo{ hasNextPage endCursor } count nodes { jobs(first: […]

  • How to use middleware with Nest.js and GraphQL | Nest.js GraphQL Middleware?

    0 I’m working on a Nest.js project that utilizes GraphQL for its API, and I’m interested in implementing middleware to handle specific tasks in my GraphQL resolvers. However, I’m having some trouble figuring out how to integrate middleware effectively within the Nest.js and GraphQL ecosystem. Here’s a brief overview of my project’s current setup: I’m […]