3 I’m a little stuck with one GraphQL query. { collectionByHandle(handle:”price”) { products(first: 16, sortKey:PRICE, query:”title:Bracelet”){ edges { cursor node { title } } } } } The error comes from the query parameter which is not supported on Custom collection, but it is on a Smart one. query: String This field is only used […]
0 I am using Vue Apollo Composable with useQuery to perform a GraphQL query. My pagination works as expected; however, I am facing an issue with my filters.verified variable. Although I see the variable toggling in the client-side (I’m logging it), the network request still shows the initial value as true. Problem: When I click […]
0 I’m encountering difficulties while writing Jest unit tests for a module that interacts with graphql-request. Here’s the test import { jest } from ‘@jest/globals’; import { request } from ‘graphql-request’; import { logActivityPhoneCallScheduled, } from ‘./candidateService’; jest.mock(‘graphql-request’, () => { return { request: jest.fn(), }; }); beforeEach(() => { jest.clearAllMocks(); }); test(‘scheduled’, async () […]
0 I need to access only the "departments" type in this large type generated from GraphQL: export type GetCompanyChartQuery = ( { __typename?: ‘Query’ } & { generateOrgChart?: Maybe<( { __typename?: ‘DepartmentNode’ } & Pick<DepartmentNode, ‘name’> & { manager?: Maybe<( { __typename?: ‘EmployeeNode’ } & Pick<EmployeeNode, ‘name’ | ‘mobilePhone’> )>, departments?: Maybe<Array<Maybe<( { __typename?: ‘DepartmentNode’ […]
0 To learn GraphQL and Apollo I am working on a Tic Tac Toe game. Currently the way it works is that the server stores all game information so when the client clicks a square, it sends a mutation to the server which updates the GameState type and returns the new state. What I would […]
0 salesforce graphql api query accounts, for the second page, using previous endCursor for "after" value, return some duplicate records that already show in the first page. I am using v57 api First page query: query accounts { uiapi { query { Account (first:10) { edges { node { Id Name { value } } […]
0 I am working on a GraphQL mutation to create a project with associated phones and their parts, in other words relationship between is so: Phone can have multiple parts. I have defined a schema for querying phones along with their parts. However, I am encountering an error when trying to create a project with […]
0 I have a rest api written in typeScript and one of my downstream API is in Graphql. I am using graphql-request to consume the downstream graphql api. Version in package.json "graphql": "^16.6.0", "graphql-request": "^6.1.0", and my code is import { GraphQLClient, gql } from ‘graphql-request’ export const getUser = async (authToken: AuthToken) => { […]
0 In my project I’m updating to Node 18 and also converting from commonjs to esm. When I run the Jest tests I’m getting this error TypeError: request.mockResolvedValue is not a function In the following file but as you see the jest.mock()is on top of the scope as per documentation and also what I saw […]
0 When using GraphiQl how can I make comment’s in the variable section? Is it even possible? For example I can make comment’s in the query section using # like: query ProductVariants($quantityPro: Int!, $quantityVar: Int!) { products(first: $quantityPro) { edges { node { id # Title of the product title variants(first: $quantityVar) { edges { […]