Tag: javascript
-
fetch graphql query from external server
0 i’m trying to fetch some leetcode stats using leetcode’s graphql schema. when i enter the query in the browser, it gives me a response, but it’s not responding to me when i use axios. here’s the query i enter in the browser: https://leetcode.com/graphql?query=query { questionSubmissionList( offset: 0, limit: 20, questionSlug: "two-sum" ) { lastKey…
-
How to do a simple join in GraphQL?
30 I am very new in GraphQL and trying to do a simple join query. My sample tables look like below: { phones: [ { id: 1, brand: ‘b1’, model: ‘Galaxy S9 Plus’, price: 1000, }, { id: 2, brand: ‘b2’, model: ‘OnePlus 6’, price: 900, }, ], brands: [ { id: ‘b1’, name: ‘Samsung’…
-
Not able to run GraphQL mutations in Redux even though I am able to run it within the component [closed]
-2 Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 13 mins ago. Improve this question I am currently working on a project in which GraphQL is being implemented for the first time and initially…
-
Malformed Cursor (shopify graphql api query)
0 I am trying to fetch collections (paginated) from my shopify store using graphql query, i have written this route: async function (req: CustomRequest, res: Response) { const shopUrl: string = req.shopUrl || “”; const accessToken: string = req.accessToken || “”; let { count, after }: any = req.query; const params = new URLSearchParams(); if(!count){…
-
How can I show a message to the user when in the browser the request sends a 504 gateaway timeout?
0 Right now when I send a request with multiple collections, the browser chrome shows me a 504 timeout ‘cos it has taken more than 60 seconds. The client has asked me to display a new message to the user when this issue happens. I’m a bit lost as this is the first time that…
-
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 avoid overspecifying fields in queries in graphql while avoiding multiple network requests across pages
0 If I have two pages, StepsList and StepDetail, I understand it’s impossible to avoid overfetching on the first page (StepsList) if we want to avoid a second network request on StepDetail // StepsList steps { id name <- I have to specify this field here even if it’s not used, to avoid a network…
-
Apollo Client gql lte, gte null values Issue
0 I have this query using to query from a graphql subgraph. I use apollo client in my Next.js front-end to query data. This is my query: const DOMAIN_FIELDS = gql` fragment DomainFields on Domain { expires id isListed name listingPrice listingExpiresAt lastSalePrice owner tokenId seller } `; export const GET_DOMAINS = gql` ${DOMAIN_FIELDS} query…
-
Posting Image to wordpress through Apollo client and GraphQL
0 I’m currently facing a challenge with React Native related to file uploads. I’m working with a WordPress backend that uses GraphQL, and for file uploading, I’m relying on the wp-graphql-upload plugin available on GitHub. This plugin requires the submission of actual file objects, but React Native inherently doesn’t support direct file submissions – it…
-
Code splitting GraphQL types causing issues on require
0 I’m going through a graphql & node tutorial and I’m trying to do a bit of code splitting on the various aspects of the repo, splitting the Types, mock data and schema out into their own respective directories. It seems that the schema and the mock data are playing ball, but the types are…