Questions

  • Grafbase Collection not displaying if related field deleted

    0 I have the following model in my NextJs 13 app. I am using grafbase. // @ts-ignore const User = g .model(‘User’, { name: g.string().length({ min: 2, max: 100 }).optional(), email: g.string().unique(), password: g.string().optional(), active: g.boolean().optional(), allowReset: g.boolean().optional(), avatarUrl: g.url().optional(), }) .auth((rules) => { rules.public().read() rules.private().create().delete().update() }) // @ts-ignore const ActivateToken = g .model(‘ActivateToken’, { […]

  • can i use page items in cursor base pagination?

    -1 can i use page items in cursor base pagination? for example it’s possible to directly address a specific page. For instance, if the requirement is to jump directly to page five, it’s possible to do so since the pages themselves are not explicitly numbered. reactjs graphql apollo-client Share Improve this question Follow asked 39 […]

  • Syntax error wile trying out NRQL in NewRelic

    0 I am trying to fetch some data via NewRelic’s NerdGraph GraphQL API. url="https://api.newrelic.com/graphql" headers={"API-Key": api_key} nrql="""query{ actor { account(id: 1234) { name } } } """ response=requests.get(url=url, headers=headers, json={‘query’: nrql}) However, I am getting an error. {‘errors’: [{‘locations’: [{‘column’: 2, ‘line’: 1}], ‘message’: ‘syntax error before: "\"query\""’}]} The same query works in NerdGraph API […]

  • Execute a graphql query using painless script, with params having hyphen and space and match a field property with type keyword and text

    0 I’m new to graphql and opensearch queries. Here I’m trying to add a filter to existing query for city, my params inside the query are having data with – and spaces. While I’m trying to query it, data is getting filtered only with first word. For example, my params is having an array "cityNames" […]

  • Show filtered content related to an object by the value of an input JSX element

    0 Say i have an input element that filters categories on a given value. That category object has name, slug, posts, so what I want to do is to show only the posts that are related to that category as the input element in a Search function receives a value . In the console I […]

  • how to set proxy for apollo/client for server side nestjs

    0 Resolver file @Resolver() export class LaunchResolver { private readonly client: ApolloClient<any>; constructor() { this.client = new ApolloClient({ uri: ‘https://spacex-production.up.railway.app/graphql’, cache: new InMemoryCache(), }); } @Query(‘launches’) async getLaunches(): Promise<Launch[]> { const response = await this.client.query({ query: gql` query GetLaunches { launches { mission_name launch_date_utc } } `, }); return response.data.launches; } } I am running […]

  • Is there a way to search through job postings with new Upwork GraphQL API?

    1 Since Upwork is deprecating REST API support on December 15, I’ve started refactoring my application to support new GraphQL API. My main REST API requests are: Search Jobs: GET /api/profiles/v2/search/jobs.{format} Get Job Profile: GET /api/profiles/v1/jobs/{job_key}.{format} The problem is, GraphQL API Docs does not seem to have similar requests in "Search" directory. Only thing I […]

  • graphql codegen defaults to watchQuery, no possible way to alter? I only want to get the value 1 time

    1 I have a sveltekit + apollo graphql project here. introspecting from my dev-env api here. The issue I’m having is the codegen with this config: import type { CodegenConfig } from ‘@graphql-codegen/cli’; const config: CodegenConfig = { schema: ‘<<<url>>>’, documents: ‘./src/lib/graphql-service/**/*.gql’, generates: { ‘./src/lib/graphql-service/generated.ts’: { plugins: [‘typescript’, ‘typescript-operations’, ‘graphql-codegen-svelte-apollo’] } }, watch: false }; […]

  • Defining relationships between different graphql model types

    0 The context of our problem: We are new in using AWS DataStore via GraphQl and defined two models, Memory and UserLabel. type Memory @model { id: ID! authorId: String! text: String! createdOn: AWSDateTime! lastModifiedOn: AWSDateTime! userLabels: [UserLabel] @hasMany(fields: ["id"]) mapPin: [MapPin] @hasMany(fields: ["id"]) } type UserLabel @model { id: ID! authorId: String! name: String! […]

  • GraphQL deleteManyConnection not able to delete a record

    0 I am implementing a function to delete a record from the database with graphql but it is giving me headaches now. I am using hygraph/graphcms on which the query is running perfectly fine but its not working in the code. here is the query – const deleteLikeNotificationQuery = gql` mutation DeleteLikeNotification( $actorId: ID! $notifierId: […]