Tag: javascript
-
Regarding dynamic field selection in apollo-server
0 I’m using apollo GraphQL for backend and frontend. I want to dynamically select fields which are requested by the client. With the help of info argument I created a function which gives me selected fields by client and based on that I fetch selected fields from db. Resolver selection.fields = .extractSelection(info?.fieldNodes[0]?.selectionSet) function implementation .extractSelection…
-
Regarding dynamic field selection in apollo srever
0 i am using apollo GraphQL for backend and frontend . i want to do dynamic selection of fields which is selected by client . so with the help of info argument i get i created a function which give me selected fields by client based on that i fetched selected fields from db. here…
-
Why does async code mess up my dataloader in a graphql resolver?
0 I have a dataloader that I’m using to batch requests to a service to get my user’s addresses. The loader doesn’t batch requests correctly when the parent resolver uses async code. Here’s a general idea of what my code looks like: // User.ts import Demographic from ‘./Demographic’ export type User { name: ‘User’, description:…
-
Shopify Processing Error On File Upload Through JS/GraphQL
0 I am implementing a simple solution that allows the user to select a file (any type of image). Once selected, the user clicks on "Upload Image," and the API call is triggered. I am receiving a status 200 in response, but when I check the Shopify Files directory in the admin panel, it shows…
-
Using batchDelegateToSchema with Schemas Containing Union Type in GraphQL Tools
0 I’m working on a GraphQL project where I have multiple schemas, and one of the schemas includes a Union type (Site) which can represent different types, such as PhysicalSite and WaitingRoom. I need to use batchDelegateToSchema to efficiently resolve the ‘sites’ field on the ‘Study’ type, which returns a SitesConnection that includes the Site…
-
How to correctly use the IN filter with graphql?
0 I’m trying to fetch multiple transactions with an array of IDs but i might do something wrong and i’m facing the following error : ERROR GraphQL Error: [ { path: null, locations: [ [Object] ], message: "Validation error of type WrongType: argument ‘filter.id’ with value ‘ObjectValue{objectFields=[ObjectField{name=’id’, value=ObjectValue{objectFields=[ObjectField{name=’in’, value=VariableReference{name=’ids’}}]}}]}’ contains a field not in ‘ModelIDInput’:…
-
Study Group: Beginners
Actions Panel Join us for this study session, where you'll tackle introductory Javascript coding challenges and work on your technical communication. By CodesmithFollow Date and time Wednesday, November 1 · 2 – 4pm PDT Location Online About this event 2 hours Mobile eTicket Join us in this study session, led by our CSX Fellow and…
-
CORS blocks mutation in GraphQL Yoga
6 I am working here with a graphql prisma backend and a graphql yoga express server on top of that. In the frontend, I am trying to call a signout mutation but its blocked by the CORS policy. Though I have added cors settings in my graphql yoga server, I keep getting this error. GraphQL…
-
Discrepance between an array response from graphQL and same array printed with a console log
0 I have a very strange behaviour and I need your help. I retrieve a list of content from a GraphQl API that i attach you: client.query({query: PAGES_LIST}).then(res => console.log(res.data.pages) The problem is that the response from the network is that: [ { "id": "ddf", "title": "DDF", "type": "HOME", "draft": false, "newtonId": "64edfc8f3508bb20a9dbef19", "creationDate": "2023-08-29…
-
Gatsby ,GraphQl content mapping bug
0 I am using Gatsby, GraphQl, and contentful. In my project i am trying to connect specific banner section to specific page (like home page should have banner of home and similarly for about us page and other pages) and i am writing my code for banner in banner.jsx . so the approach is every…