Newest 'graphql' Questions - Stack Overflow

Questions tagged [graphql]

GraphQL is an API technology designed to describe the complex, nested data dependencies of modern web applications.

0
votes
1answer
8 views

Is it possible to use postgraphile with .net core?

I am trying to create an angular project with .net core 2.1 with GraphQL library. I am totaly new in PostgresSQL, GraphQL & PostGraphile. So, just want to know is it possible to use PostGraphile ...
1
vote
0answers
24 views

How to go back to navigate the previous screen without re rendering any function react

Here on button click event I am uploading some data in server . I am using mutation for this . And after the response I have to navigate to previous screen and I don't want to refresh the page or re-...
0
votes
0answers
8 views

How do I make Yelp GraphQL call from R studio?

I am trying to make an Yelp GraphQL API call from R. The Yelp site gives the following as a sample for a query. $ curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: ...
0
votes
0answers
18 views

GraphQL Playground Query JSON To Postgres - How To Avoid Double Quotes In Query String? [duplicate]

The Query Variables section of Playground seems to require a JSON object for the query argument. With Postgres we can't use double quotes for a string, it must be single quotes. Playground is ...
-1
votes
0answers
18 views

POST Method in GraphQL consuming the ReST API

I have an ReST API and in the process of consuming from GraphQL. I have googled and got a small piece of code and trying to modify according to my needs. And I am getting the following errors. Am not ...
0
votes
1answer
16 views

Apollo client Graphql query variable type error

I am trying to execute delete query in which IDis required but I am getting an error. "Variable "$id" of required type "ID!" was not provided" Query export const DELETE_CUSTOMER = gql` ...
-1
votes
0answers
18 views

GraphQLError: Syntax Error: Expected Name, found $

I'm working on a project that need both fetch and mutate data from a database. I'm building the endpoint with apollo-graphql. I have the schema and now I'm working on the resolver. But when I try to ...
0
votes
0answers
5 views

How to subscribe to a nested query with graphql?

I would like to see the updates of user details in the following queries while they are changed but seem to not get what I want. const COMMENTS_SUBSCRIPTION = gql` subscription onCommentAdded($...
0
votes
0answers
6 views

Why does an integer not get input into my sql db when using a graphql mutation?

When testing a graphql mutation we have built, the integer value for price being passed through graphiql does not get input into the field and instead contains a null value. This is for an SQL db ...
0
votes
1answer
16 views

using loop/foreach on args from graphQL's resolvers?

I was wondering if it was possible to loop on "args" of a graphQL resolver ? I would like to be able to do an automatic processing of arguments, the goal is to dynamically modify the restrictions of ...
0
votes
0answers
16 views

GraphQL throwing syntax errors

I am developing the GraphQL Node tutorial, and am up to step 7. https://www.howtographql.com/graphql-js/7-subscriptions/ I am getting a number of syntax errors from this code in my datamodel.prisma ...
-1
votes
0answers
14 views

How do I query a specific field in the database before I execute a mutation

I'm trying to send a query to a table which should send me back information which will be need in order to execute a mutation on that field. But however if the database is empty or the user was not ...
0
votes
1answer
32 views

why am i get only last record of json array, which received from graphql with flutter?

i have read all related question but there is no my solution. so please do not do any kind of things.... and be patient understand problem... my problem is similar to other but in case of flutter ...
-1
votes
0answers
24 views

filtering list using query react-apollo

i'm setting filter list using query argument i need guide don't know how to setup filter method ...ㅠㅠ create-react-app, react-apollo graphql-tag import gql from 'graphql-tag' import { Icon, Search,...
0
votes
0answers
13 views

GraphQL Client how to format uploading file to server

I am trying yo upload a picture to my express-graphql server from my react-native app. I do not want to use react-apollo as graphql client. My server use graphqlUploadExpress() : app.use( "/...
0
votes
1answer
22 views

Field 'product' is missing required arguments: id

I am learning in here. The code look like below product(first:3){ edges { node { id handle variants(first:3) { edges { node { ...
0
votes
0answers
7 views

Is there a definition about how to use `__typename` in `apollo client`?

I am using apollo client in a react project. All my graphql code is on client side only. I am using cache in apollo to manage frontend state. And I always get missing __typename error when I define ...
1
vote
0answers
29 views

Apollo local state - querying for object w unknown keys

I'm trying to add Apollo to an app. I'll be using it for fetching data, and want to follow best practices and use the new API (as of Apollo 2.5) to store local UI state as well. I've been looking at ...
0
votes
1answer
20 views

graphql-compose: TypeError: Cannot read property 'getTypeName' of undefined

I am trying out graphql-compose library and following their Getting started Github page, I build a very simple example. Here is my code: import { schemaComposer } from "graphql-compose"; ...
1
vote
0answers
13 views

How to abort file upload in apollo-upload-client?

I was looking into the code of apollo-upload-client and i came across the following code - var _createSignalIfSuppor = createSignalIfSupported(), controller = _createSignalIfSuppor....
0
votes
0answers
9 views

Solr exclude self-join records

We have just started scratching Solr realm, and one of the join queries I have tried had to do joing on the same column, for example: {!join from=i_last_name to=i_last_name}i_address_code:...
0
votes
0answers
8 views

Apollo GraphQL Websocket SSL Certificates

I am attempting to establish a websocket connection to an apollo graphql server. I am using the apollo-client-ws library to achieve this. Unfortunately, I keep getting a 400 error, and embedded in the ...
0
votes
0answers
13 views

Apollo Client Query On One Component Triggers A WatchQuery On Another - How To Stop This?

This is an Angular Apollo client but I doubt that matters. I use a watchQuery to display a list of members from a db on a component's data table. Works fine. If I click a button to view an ...
0
votes
1answer
15 views

Apollo-GraphQL error when sending word with space?

I have a GQL Apollo which filters by a state. The GQL takes values like "ACCEPTED" or "DECLINED" etc. However, I noticed that when i send a filter like "GOOD LEAVER" which has a space it won't work ...
0
votes
1answer
20 views

Resolve to the same object from two incoherent sources in graphql

I have a problem I don't know how to solve properly. I'm working on a project where we use a graphql server to communicate with different apis. These apis are old and very difficult to update so we ...
0
votes
1answer
18 views

Passing argument to React Apollo mutation

I'm having issues where a mutation appears to not send any of the arguments. My mutation appears to be correct, insomuch that the error I receive from the server is that it isn't finding the user ...
0
votes
0answers
21 views

How to send subscription to web push via GraphQL

I want to implement push notifications in my web app. I'm using Apollo GraphQL and I am not sure how to send the subscription object from the frontend to the backend (when the user allows ...
0
votes
0answers
12 views

Graphene Django to Query Elasticsearch

My data is stored in elasticsearch and it is very big. So I want to use graphql to query it properly. I am using django graphene package to query it. For database models it is working fine. My json ...
-1
votes
0answers
6 views

What is the function name of `mutation` in graphql? [duplicate]

I have defined below mutation function in apollo graphql: gql` mutation addToBasket($sku: String!) { addToBasket(id: $sku) @client { items { id } } } `; There are ...
0
votes
2answers
24 views

Graphql input object from angular object

I want to use an angular object as an input variable to a graphql mutation. I've been researching for hours and have tried seemingly every possible combination per examples including using variables ...
0
votes
1answer
26 views

Nested GraphQL query with array argument

I am using apollo-datasource-rest with apollo-server-lambda and trying to figure out how to map a query to a specific resolver. I have the following schema, in which the plan query is supposed to ...
-1
votes
0answers
10 views

Apollo GraphQL Client Get Query Result

I have code that (I believe) establishes a connection to a graphQL endpoint using the Web Socket protocol with the Apollo client. However, I have no idea how to actually access data that is returned. ...
0
votes
0answers
15 views

Pulling nested GraphQL queries into react

I need to get the roll name and roll type in react. Here is my query... import gql from "graphql-tag"; const Person = gql` query Person{ Person{ id name roll { name ...
0
votes
0answers
15 views

GraphQL: Mutation inside Query Object [duplicate]

Let's say I have a class that has properties and mutable methods: class MyClass { constructor(initialValue) { this.a = initialValue + 1; this.b = initialValue + 2; } getA() { ...
0
votes
0answers
18 views

Paginating the combined results ofa union

I'm still a little new to graphql and Apollo. But I'm curious, if I create a search query that returns a union of two types, how would I go about modifying the combined results of that union. Using ...
0
votes
0answers
17 views

Websockets on AKS using GraphQL Not Connecting

I currently have an AKS cluster setup running a GraphQL server and normal nginx ingress. We're attempting to onboard GraphQL Subscriptions, which utilize Websockets. The URL that GraphQL uses for ...
0
votes
0answers
16 views

AWS AppSync GraphQL - using union as mutation return causes error

I'm creating a GraphQL schema using AWS AppSync and I want to use Union as mutation return. I'd like to write mutation this way: mutation addUpdateTariff($tariff: TariffInput!, $seasonalTimeTariff: [...
0
votes
1answer
25 views

How to combine multiple field in GraphQL Object

I am trying my first Graphql Schema design. Is it possible that single field inside object type refer to a complex object? enum KeyPrefix { ...
0
votes
1answer
15 views

Any good way to simplify component wrapped by multiple functions?

App component has been wrapped by so many functions. Is there any way to make this look better? withstyle(styles)(withRouter(withApollo(connect(App))));
0
votes
1answer
24 views

Question about parent/child relationships and components

I'm currently trying to port a project from vuex/REST to vue-apollo. The project shows a list of events, and each event can be expanded to show details, including attendees. So I'm having an ...
3
votes
0answers
44 views

How to filter GraphQL nested array on field returning in same query's response? Or how to create GraphQL relationship on more than one field?

So I'm using GraphQL with Hasura and Apollo in my Android application. The application is related to sports, it stores multiple score sets of each player in multiple segments of a match. My Postgres ...
0
votes
1answer
28 views

console.log not working in react and graphql

I am learning graphql with the tuto: https://www.howtographql.com/react-apollo/0-introduction/ all i fine until I just want to add some console.log !! Outside the class body console.log() is ok. ...
0
votes
0answers
21 views

how do you do nested objects in graphql - i'm using appsync and dynamodb

I have the following object and I want to create a schema for it that handles nested objects - what's the best way using graphql: { "type": "product", "id": "411e2a2b-37e8-421e-...
0
votes
1answer
31 views

graphql: Must provide Source. Received: {kind: "Document, definition …}

I'm really new to Graphql (just yesterday actually). I am "playing" around and try the various tools of the ecosystem (apollo-server, graphql.js ...ect). For the sake of experimenting, I am trying to ...
0
votes
1answer
16 views

Are ids automitaclly encrypted in Graphql queries?

In my database (postgres) I store a table of events and each event has an "id" column which is a UUID type. But when I send a GraphQL query the id I receive back is not a string UUID but looks like ...
1
vote
1answer
26 views

Query by relationship for GraphQL?

How would you use graphQL to query by a "relational" entity value? For instance, lets say we have a bunch of person-objects. Each "person" then has a relation to an interest/hobby which then has a ...
0
votes
0answers
23 views

mongo model fields not available in query string and GraphiQL query

I am creating a project to query a mongo schema in GraphQL. I have a model which act as a mongo collection and schema file for mapping the model with graphql Query. When i try to query the fields in ...
1
vote
0answers
32 views

how do I extract deeply nested type?

I'm using react-native, aws appsync and aws amplify autogenerated API.ts which includes lots of graphql query result types which are deeply nested. I want to pass a prop which is deeply nested in the ...
0
votes
0answers
22 views

How to write relationship mutation in GraphQL using GRANDstack?

I am trying to create a relationship between to nodes in Neo4j using GraphQL. What should the mutation look like? Schema shows it should look like this. AddPersonRoll( from: _PersonInput! to: ...
0
votes
0answers
12 views

Organize GraphQL mutations with Graphene

I'm trying to organize my mutations so that they're not all on the top level. Here's a collection of mutations that I want to put under a "session" section: import graphene from django.contrib.auth ...