Tag: graphql-js
-
Sorare API – Request previously sold card prices
0 I’m trying to retrieve the price of the last sales of sorare cards for a particular player. I can’t find the right argement to pass to the query to do this. I’m also looking to see if it’s possible to retrieve indicators such as average card prices. I’ve managed to retrieve the price of…
-
How to prevent or eliminate duplicated fields with GraphQL?
2 Is it anti pattern to prevent or eliminate duplicated fields in GraphQL? for example, this query has the same id field 10 times and even tho it doesn’t return the value 10 times, but it’s increasing the query cost, so, what is the best way to deal with this? how can I prevent querying…
-
Graphql Shopify | Query articles with its metafields
1 Has anyone done a query for Articles that have metafields? I can query the articles with its title, otherfields etc, but by default Shopify won’t return the articles metafields in this call. These metafields for these articles have been created by an app. My first goal would be trying to call all articles and…
-
Modify multi query arguments in graphQL-JS
0 I am building an app using graphQL, neo4j and Apollo client and running into issue with multi-query. I want to implicitly apply argument to multi-query on server side when user pass payload without arg. For example: query { books(where: { cust_id: "1"}) { name } posts { description } cars { type } }…
-
GraphQL Query to Get Data Two Different Tables
0 I have two tables a and b. a have id and age fields. b have id, pid, and name fields. b.pid has a foreign key relationship with a.id. How can I get age and name from these tables using a GraphQL query? Tables are created using SQL. sql graphql graphql-js Share Improve this question…
-
graphql query to get two differe tables
0 i have two tables a and b . a have id and age fields. b have id,pid and name field. b.pid have foreign key relationship with a.id . how can i get age and name from these tables using graphiql query? tables are created using sql. sql graphql graphql-js Share Improve this question Follow…
-
What is the correct way to update a post within a graphql subscription?
0 I’m working on a project using graphql with React Native in the frontend and Nodejs in the backend with mongodb as my database. In this project, I have posts that are created and shown on a screen. I’ve done this using graphql subscriptions for real time updating of posts, but I need the user…
-
I am getting a required error using graphql tools
3 I am building a gql server application using apollo server. When I try to load my .graphql files using import { loadFilesSync } from ‘@graphql-tools/load-files’, this works very well, but when I load my resolver files, i get an error node:internal/errors:464 ErrorCaptureStackTrace(err); ^ Error [ERR_REQUIRE_ESM]: require() of ES Module /userpath/index.js from /userpath/server-gql/noop.js not supported.…
-
how to add product to shop cart via apollo and react
0 I try to use useMutation to add product to cart by button click, but after a lot of attempts it still don’t work and i can’t understand how to make it work. my code looks like that: product.jsx const [add, {error: addError}] = useMutation(ADD_CART, { update(cache, { data: { add } }) { cache.modify({…
-
How can I get schema from graphql?
0 I have a field There are values inside SignificanceLevelType : How can I get these values in frontend if there aren’t a special query for this? When I sent: query { protectedNaturalAreas { edges { node { significanceLevel } } } } I got significanceLevels in protectedNaturalAreas, but I want to get existing areas…