Tag: graphql
-
Micronaut – Exception: manualy registered singleton by adding framework dependecy
0 I currently have an existing Micronaut server project that containing multiple endpoints. I’m considering incorporating an additional GraphQL endpoint and introducing management endpoints for a new feature. However, whenever I add one of these dependencies (micronaut-graphql or micronaut-management), the software fails to start and consistently generates the following error message: ←[36m13:12:08.804←[0;39m ←[1;30m[main]←[0;39m ←[1;31mERROR←[0;39m ←[35mio.micronaut.runtime.Micronaut←[0;39m…
-
Artemis code generation failing to build a Dart class for one of the types in my GraphQL schema
0 This is an excerpt from a schema I’m working on. I’m trying to use Artemis to generate Dart classes for a Flutter app. interface Node { """The ID of the object""" id: ID! } type PictureNode implements Node { """The ID of the object""" id: ID! image: String! created: DateTime! thumbs: ThumbnailsNode } type…
-
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…
-
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:…