Tag: graphql
-
Duplicate “graphql” modules cannot be used at the same time since different versions may have different capabilities and behaviour
0 `Currently i am facing the problem during the migration of the Apollo server from version 2 to version 4 We are downloading and implementing changes in lot of packages mainly when it comes to the Graphql package i have downloaded all the components and installed in my machine but some packages says that duplicate…
-
In AWS AppSync VTL resolvers how to change a value before writing it to the datasource?
0 With this req template I can send the event to a lambda where I can check and edit some user input fields: { "version": "2018-05-29", "operation": "Invoke", "payload": { "typeName": "$ctx.stash.get("typeName")", "fieldName": "$ctx.stash.get("fieldName")", "arguments": $util.toJson($ctx.arguments), "identity": $util.toJson($ctx.identity), "source": $util.toJson($ctx.source), "request": $util.toJson($ctx.request), "prev": $util.toJson($ctx.prev) } } My lambda is correctly triggered. I’m not sure what…
-
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…
-
Pass dynamic key value in grapql query React Native
0 hello all I develope application in react native with qraphql so here is my one of the query { products( filter: {category_uid: {eq: "Mw=="}, bestseller: {eq: "44"}} sort: {name: ASC} pageSize: 10 currentPage: 1 ) { total_count items { uid name sku boutique_name small_image { url label } } } } So in above…
-
How to make GraphQL efficient in terms of serverdatabase communication
0 I am relatively new to GraphQL. Although, I see the next issue in this api building approach. GraphQL allows efficient communication between client and server because the client could select the bare minimum required fields and server sends just these fields and nothing more. That reduces a client-server bandwidth. That’s a pros. Although, for…
-
How can I parse a custom scalar in Apollo Client?
0 How can I return a Decimal type from my backend GraphQL server and then parse it on my frontend client? I have a backend that returns a product with a price. The price is a custom scalar of Decimal type. The schema is like so: scalar Decimal type Product { id: ID! price: Decimal…
-
How to implement error handling globally for URQL GraphQL mutation?
0 My stack is: react v17.0.2 graphql v16.8.0 graphql-ws v5.14.0 urql v4.0.5 I use Hasura Actions to connect to REST API and I need to implement global error handling for all mutations. For example I have useAuthentication hook that returns a signOut promise: import { useMutation } from ‘urql’; export const useAuthentication = () =>…
-
Apollo4 and GraphQL CORS
-1 I’m trying to access my graphQL server on my production server but getting the CORS error. The request url is: https://mov****.at/graphql In my index.mjs where I start the Apollo server I have CORS defined as so: app.use( ‘/graphql’, cors({ origin: [‘https://mov***.at’, ‘https://mov***.at/graphql’, ‘https://studio.apollographql.com’] }), bodyParser.json(), expressMiddleware(server), ); And in my graphql.module.ts I have the…
-
Strapiv4 & apollo graphql, sort results by multiples dates
0 I have a list of articles, which have several dates attached to them : publishedAt (default date generated by strapi when article created) date (manual date user can enter to alter the default date) updateDate (manual date user can enter to print a second date, mentioning that the article was updated, and when) Basically…
-
Apollo Federation supergraph query gives an error
2 I got most of the tutorial up and running just fine, i.e subgraph creation, publishing subgraphs to Apollo Studio, and setting up the router. When I try to run a unified query on the supergraph, however, I get the following error, 2022-11-10T19:20:59.880454Z apollo-router/src/services/subgraph_service.rs:173 ERROR [trace_id=dc031984b0655a46580ce9ac8c7fd6e6] apollo_router::services::subgraph_service: fetch_error="hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error:…