Tag: graphql
-
xExchange API: the price of a LP token is 0
0 I’m querying the xExchange’s GraphQL API, but when I’m requesting the price of an LP token the field price is 0 (but it shouldn’t). Does anyone know how to fetch the price of an LP token through this API? Here is the query I’m doing: query { pairs(firstTokenID: "BUSD-40b57e") { liquidityPoolToken { identifier, price…
-
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){…
-
ApiPlatform best way to convert to exist entity on mutation graphql
0 I have this entitys for user #[UniqueEntity(fields: [’email’], message: ’email is exists’)] #[ORMEntity] #[ORMTable(name: ‘user’)] #[ApiPlatformApiResource( operations: [], graphQlOperations: [ new ApiPlatformGraphQlQuery(), new ApiPlatformGraphQlMutation( name: ‘create’, denormalizationContext: [‘groups’ => [‘request:create’, ‘shopping:create’]], ), ] )] class User { #[ORMId] #[ORMGeneratedValue(strategy: ‘AUTO’)] #[ORMColumn(type: ‘integer’)] #[SerializerExpose] protected $id; #[AssertEmail(message: ’email not valid’)] #[ORMColumn(type: ‘string’, unique: true, length:…
-
Spring Boot GraphQLQueryResolver won’t run, runs on test project
1 So I’m new into GraphQL and i got stuff running by manually setup a schemaparser and datafetchers. But I want to refactor and try out by implementing GraphQLQueryResolver to a class and controll my queries from there. I get it to work by making a new project, but with the same dependencies and should…
-
How can I use Prisma types on a nest.js GraphQL query argument
0 I’m working on a simple GraphQL query that allows me to fetch a list of users. I want to be able to sort them through my request. I’m using Prisma as an ORM. As per the documentation, my service simply looks like this: /** * Find all users */ findAll({ skip, take, cursor, where,…
-
How to implement union in spring-graphql. I get error that I’m requesting object but its rather a ‘graphql.schema.GraohQLUnionType’
0 I wanted to create a union named Tables, that holds all the other tables and the user can request the table accordingly. I get the error: You have asked for named object type ‘Tables’, but it’s not an object type but rather a ‘graphql.schema.GraohQLUnionType’ Here is my graphql schema: type Query{ getData: [Tables] }…
-
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…
-
Optimization of a Match statement
0 MATCH (t1:Tel{TB:true})<-[:TelBIZ]-(:ACC{TB:true})- [or:REBIZ{movOre:t1.nuTel}]->(:ACC{TB:true})-[:TelBIZ]->(t2:Tel{TB:true,nuTel:or.movBene}) WHERE t1.nuTel<>t2.nuTel RETURN t1,t2,COUNT(or) AS Ope,SUM(or.imp) AS Total, 10^3 as precision,max(or.Txt) as mRB I am trying to run this query to return few values.but I find the query is not optimised. kindly suggest me how can I make it optimized code in neo4j 3.5v I am expecting a better optimized query…
-
Apollo gql, get loading state when polling
0 I am using @apollo/client v3. I want to get loading state when requests will happen from polling but it is not working as I expect. This is my query const { data, loading } = useQuery(SOME_QUERY, { variables: { variable: "value", }, 10000 //poll interval }); I wrote useEffect to catch if it is…
-
React: Not able to run graphql mutations in redux even though I am able to run it within the component
-1 I am currently working on a project in which GraphQL is being implemented for the first time and initially I only had to run GraphQL mutations within the component(using Apollo-client and it’s hook – useMutation) that I was working on and all was well. Now, I am trying to have the mutation in the…