Tag: graphql
-
How do i define an enum in react native
8 Basically what I’m trying to achieve is send info to the server without quotations e.g Admin instead of “Admin”, but as we all know Graphql will throw an error is the variable is not defined or is not in quotations. javascript react-native enums graphql Share Improve this question Follow asked May 2, 2018 at…
-
How to have an offset paginated query and a cursor paginated query with Nestjs-query?
1 I’m using nestjs-query, and I have an entity (TodoItem). I would like to generate 2 resolvers/queries to fetch many todos: A cursor paginated one An offset paginated one. This is what I did: resolvers: [ { DTOClass: TodoItemDTO, EntityClass: TodoItemEntity, create: { disabled: true }, update: { disabled: true }, delete: { disabled: true…
-
how to use grapqhl-scalars with graphql-tag “gql`” syntax?
0 I am reading through this page: https://the-guild.dev/graphql/scalars/docs/quick-start It explains how to get pre-built graphql scalars. The examples on the page about how to use these scalars, seem to be using a code-first approach to building a schema. I am not sure how to use these scalars with the SDL-first approach where I have a…
-
Dictionary in GraphQL resolver of NestJS
1 In my NestJS project I’m creating a GraphQL endpoint for a service that returns a dictonary object: { [key: number]: MyDataDto } In my .interfaces.ts file I would like to have something like: interface ArrayAsObject<T> { [key: number]: T } @ObjectType() export class MyDataDtoAsDictionary implements ArrayAsObject<MyDataDto> { @Field(() => MyDataDto) [key: number]: MyDataDto }…
-
How to structure Github APIv4 Golang Query for specific release
0 Using https://github.com/shurcooL/githubv4 and I’m really struggling to pull back a specific Release for a gh repo. The below code block keeps returning nothing when there is a v3 release: var releaseQ struct { Repository struct { Release struct { Author githubv4.String } `graphql:"release(tagName:$tagName)"` } `graphql:"repository(owner:$repositoryOwner,name:$repositoryName)"` } variables = map[string]interface{}{ "repositoryOwner": githubv4.String("jacobtomlinson"), "repositoryName": githubv4.String("gha-find-replace"), "tagName":…
-
Amplify GraphQL order points by lat-long
0 I have a graphql query that returns a list of pullup bar objects. Query: query PullUpBarsByDate($userID: String) { PullUpBarsByDate( type: "PullUpBar" sortDirection: DESC ) { items { id lat lng userID } } } Returns something like this: [ { id: "rf6zrd1prm", lat: 63.50235889533083, lng: 28.426290788320724, }, { id: "y80ymnlgzi7", lat: 62.5654380797649, lng: 17.338090077030582,…
-
Gatsby + graphql-eslint: ESLint Parsing error
0 I’m following an official guide for linting graphql queries in my components. Updating eslint config like guide says causes following error in all my queries: How do I fix it? graphql eslint gatsby Share Improve this question Follow asked 2 hours ago jeron-diovisjeron-diovis 79711 gold badge88 silver badges2020 bronze badges Load 7 more related…
-
How to create Shopify Order Discount App? [closed]
-4 Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 51 mins ago. Improve this question I am trying to create a Shopify order discount app. I have installed the…
-
Error from a non-sharable field defined in a subgraph that shoudn’t have this field
1 I have multiple GraphQL microservices (subgraphs, using ApolloFederationDriver) with a GraphQL gateway (using ApolloGatewayDriver) I have a really strange bug since I’ve upgraded my GraphQL microservices and gateway to use @apollo/server (@nestjs/graphql@11 + @nestjs/apollo@11) : I have an error when my subgraphs are composed telling me that subgraph A has a non shareable field…
-
Problem accessing directives inside TypeInterceptor using HotChocolate v14
0 I am trying to access the directives of each field’s type of intercepted types using HotChocolate v14. Why am I getting TypeInitializationException when trying to access ObjectType’s Directives in my TypeInterceptor.OnAfterCompleteName? I also tried OnAfterCompleteType but the same happens. internal sealed class ZajilTypeInterceptor : TypeInterceptor { public override void OnAfterCompleteName(ITypeCompletionContext cc, DefinitionBase td) {…