0 Here is a scenario: User A is friends with user B. User C is an admin. When user A queries the list of his friends, the list comes back, and user B is one of its members. This list is cached and the following queries are read from the cache. Now, let’s say the […]
0 Question: Hello everyone, I’m relatively new to Amplify and currently working on a mobile application using React Native. The app is being developed for both Android and iOS platforms. I’ve integrated Amplify Auth and a GraphQL API into the app. While I’m able to access GraphQL data before authentication on iOS successfully, I’m encountering […]
0 Example from the documentation: import type {AppQueryType} from ‘AppQueryType.graphql’; const React = require(‘React’); const {graphql, useQueryLoader, usePreloadedQuery} = require(‘react-relay’); const AppQuery = graphql` query AppQuery($id: ID!) { user(id: $id) { name } } `; type Props = { initialQueryRef: PreloadedQuery<AppQueryType>, }; function NameLoader(props) { const [queryReference, loadQuery] = useQueryLoader( AppQuery, props.initialQueryRef, /* e.g. provided […]
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 } } […]