Questions tagged [graphql]
GraphQL is an API technology designed to describe the complex, nested data dependencies of modern web applications. It is often considered an alternative to SOAP or REST
20,022
questions
0
votes
0
answers
5
views
Python graphql - OVO API No refresh_token present
I have used the OVO energy API as shown here LINK to parse my current balance from the homepage. My code is shown below:
import requests
import json
import requests, pickle
#POST REQUEST TO LOGIN/...
0
votes
0
answers
7
views
How to send spring-graphql client subscription ping messages
I'm using the spring framework's spring-graphql library to create a graphql client, as per the docs. When connecting to the server using a websocket for subscriptions, everything works fine for 5 ...
0
votes
0
answers
21
views
How to do multiple mutations in a single graphql query in .NET Core
I am working on an application that is integrated with an online e-commerce store "Shopify". I am using graphql client for querying and mutations.
I have a query on which I need to add ...
0
votes
0
answers
12
views
Calling GraphQL API from a Lambda function - do i need to sign the request?
According to this Amplify doc before my lambda can query AppSync I need to do 2x things.
Assign the correct IAM Roles
Sign the request
Why is this necessary - shouldn't the IAM Role be enough to ...
-1
votes
0
answers
7
views
Gatsby GraphQL query no longer working after update
So I had this graphql query on my gatsby site before they updated and now it no longer works.
query ($skip: Int!, $limit: Int!) {
allMdx(
filter: { fileAbsolutePath: { regex: "/posts/&...
0
votes
0
answers
14
views
Passing array of objects to the React js GRAPHQL mutation
I am try ing to pass array of objects to the graphql mutation in react and typescript. My object contain one file insert by user. so my mutation is like below
const CREAT_SCOPES = gql`
mutation ...
0
votes
0
answers
8
views
hotchocolate (GraphQL) filter by extended schema (stitching)
Is it possible to 'filter' (where) by an extended schema in stitching file in graphQL?
For example:
{
contractSKUCost(where: { contractSKU: { products: { productId: 1}} }) {
items {
id
...
-1
votes
0
answers
22
views
How to convert IQueryable to GraphQL request?
I ran into a problem that I need to convert an IQueryable query, which is intended to be executed by the context. I came across only one library that solves the problem I need
But unfortunately it ...
0
votes
1
answer
32
views
Nest can't resolve dependencies in my project
the console says :
Nest can't resolve dependencies of the VisitService (?, DonorService). Please make sure that the argument VisitModel at index [0] is available in the VisitModule context.
Potential ...
0
votes
0
answers
9
views
Strapi - GraphQL - Issue on sorting and paginating
I’ve had an issue using Strapi when I try to combine sorting and pagination on my GraphQL requests from a NextJS front. Basically, I am trying to query the backend to fetch all records sorted by ...
-1
votes
0
answers
13
views
I'm trying to export a GraphQLSchema using ES module but it does'nt work [closed]
const RootQuery = new GraphQLObjectType({
name: 'RootQueryType',
fields: {
projects: {
type: GraphQLList(ProjectType),
resolve(parent, args) {
return projects.find();
...
1
vote
0
answers
8
views
GraphQL Subscription fields not able to access context of resolver i got the empty object - Subscription context is not available
I am trying to implement a GraphQL subscription server using the SubscriptionServer from the 'subscriptions-transport-ws' library. My problem is that the context object, which is passed to the ...
0
votes
0
answers
25
views
Postman Graphql Schema Refresh not working
I am using postman for my qrpahql requests with spring boot.
When i try to refresh the schema my application gave an error.
graphql.AssertException: query can't be null
at graphql.Assert.assertNotNull(...
0
votes
0
answers
8
views
Graphql - on page refresh the where clause is getting ignored
I have this graphql mutation / update record script. Which is getting pinged on refresh. the where clause with route is not effective, as it is leading to inserts into other rows, where the where is ...
0
votes
0
answers
11
views
how to send multiple files to backend via GraphQL in Django
I have this code:
test_image = SimpleUploadedFile(name='test.jpg', content=b'test')
response = self.file_query(
'''
mutation createBook($input: BookMutationInput!) {
createBook(input: $...
0
votes
1
answer
29
views
GraphQL Mutation how to make fields optional to update fields only by selection and generate schema
I have a graphql mutation defined as follows
type Mutation {
updateParts(
partId: String!
parts: PartRequest!
): UpdatePartsResponse!
}
input PartRequest {
name: String!
...
0
votes
0
answers
21
views
Contentful graphql one too many relationship
I am trying to achieve this: getArticleBySlugWithFilteredTags('tag1', 'tag2', 'tag3') using 1 query ( 1 request ) and avoid clientside filtering ( grab many and filter out with javascript ).
I have ...
0
votes
0
answers
22
views
Spring Graphql path not found on Docker Container
Hi There
Everything is working without any problem when application is running on IntelliJ IDEA. Mutation is working fine Query is working fine there is no problem at all. But when application is ...
0
votes
1
answer
14
views
Shopify GraphQL Storefront API Query Error
Hello I am a beginner with GrapQL/Shopify and have been following the documentation here. After trying to run a basic Storefront API call below to get information about a Collection
query ...
0
votes
1
answer
31
views
async await resolve graphql query promise not resolved
Hi All i am trying to use graphql api to fetch some country. I am using this API https://studio.apollographql.com/public/countries/home?variant=current and this is playground https://countries....
0
votes
1
answer
26
views
Monday.com Creating a new item with column values populated using the API with PHP
I am attempting to create a new item on a Monday board using the API with PHP, but I am receiving an error from the API. Here is my code:
$query = 'mutation ($myItemName: String!, $columnVals: JSON!) ...
0
votes
0
answers
23
views
How can we handle GraphQl custom response
Our Graphql api is working fine when we receive a response below formate.
{ "data": {
"translations": [
{
"name": "English",
"...
0
votes
1
answer
25
views
Migrating Apollo Server from v3 to v4 in next.js
In v3 you could write "createHandler" like that:
export default async (req, res) => {
await startServer;
await apolloServer.createHandler({
path: "/api/graphql",
})(...
0
votes
0
answers
16
views
How can I handle a batch graphql request in gqlgen?
I could use some help figuring out how to handle a batch request in gqlgen. The request is coming from an apollo client using apollo's query batching, so the request body is a json array like so:
[
...
0
votes
0
answers
7
views
access resolvers' grandparent params in graphQL middleware
I'm performing this query
query MyQuery($roomId: String, $closetId: String, $caseId: String) {
room(roomId: $roomId) {
closet(closetId: $closetId){
case(caseId: $caseId)
}
}
}
I ...
0
votes
0
answers
40
views
How to convert one json layout to different layout
Do we have any tools or technologies where I can pass a layout as input and get layout in different format based on my requirement. I have one REST end point and it is being used by 2 different user ...
0
votes
0
answers
14
views
Graph QL , can we put response layout in a file and use the same file while calling a GraphQL query?
With GraphQL is it possible to define response layout in a file and use the same file while calling the GraphQL query? just to avoid too long request body.
I tried to use different string for request ...
0
votes
0
answers
6
views
How to get list of filter by using shopify storefront graophql api
I am using Shopify storefront graphql API
On my shop backend, I set up few tag groups and using custom Supply theme to show it on web frontend filter bar
When I use storefront graphql API, I could not ...
0
votes
0
answers
14
views
Filter the connected list in Postgraphile
how can i set up filtering on top level in postgraphile i have such graphql query but if i filter data on bottom level i get a lot of unnecessary information and totalCount is not counted correctly. ...
-2
votes
0
answers
34
views
Communication between tasks in AWS ECS Fargate
I have three docker containers all running in their own Tasks (3 tasks), and each task running in a separate Fargate service (3 services) on ECS Fargate. I have all the services behind an application ...
0
votes
0
answers
27
views
input lose focus when doing live search
Description
i'm currently working with reactjs and apollo client. and i'm developing live search feature.
Problem
The problem is, when i'm typing in input type. text always losing and input is lose ...
0
votes
1
answer
26
views
What is the file extension for graphql queries?
since graphql queries are text, I'd like to just store them in a separate file, but I'm not finding any language support. gql files are for schema, not queries.
What's the vs code support for graphql ...
0
votes
1
answer
33
views
Migrating apollo-server-express to @apollo/server or graphql-yoga
apollo-server-express and apollo-server-cloud-functions are deprecated, which most tutorials online showing how to set up firebase CF with graphql rely on. I'm hoping someone can help me (and surely ...
0
votes
1
answer
34
views
Building Graph-QL for Microsoft Azure // "import okhttp3.Request" not importing
Trying to follow https://learn.microsoft.com/en-us/graph/tutorials/java?tabs=aad&tutorial-step=3 to build connectivity to Microsoft Azure AD.
I have taken directly from the sample, so far I'm able ...
0
votes
1
answer
20
views
Apollo Graphql Server: Request takes a full minute to reach resolver
I am using Apollo Graphql on a NodeJS server. I recently notices that my requests were taking a lot of time and decided to get into the issue. I added log timestamp and added console logs to various ...
1
vote
1
answer
34
views
Creating dynamic graphql query using apollo/client
I am trying to create a graphql query where the query data type and filter parameters will be passed dynamically based on user input.
I have written the below query which filters using only one field ...
0
votes
0
answers
17
views
Transform response with GraphQL and NestJS
Problem
I'm trying to use NestJS Serialization to transform an output of my GraphQL mutation:
@Mutation('myMutation')
@UseGuards(GqlAuthGuard)
async myMutation(
@Args('input') input: MyInput,
...
0
votes
0
answers
25
views
How do I do an graphql axios call to supabase to
I try to do an axios call to graphql in the documentation i see:
curl -X POST https://<PROJECT_REF>.supabase.co/graphql/v1 \
-H 'apiKey: <API_KEY>'\
-H 'Content-Type: application/...
0
votes
0
answers
30
views
line separator(LR) escape issue in json request body with WebClient
I have a project about graphql (language is JAVA), in some json value I need to add the LF(\n) in the content.
If I add the "\n" in java code, the body written is \n. No escape here.
WRITE: ...
0
votes
0
answers
27
views
Symfony CollectionType and Doctrine : Remove null items
I'm having an issue with Symfony's CollectionType.
My project is an API, receiving form values as JSON input.
I want to be able to update an entity named "Reservation", which has a ...
-1
votes
0
answers
16
views
GraphQL Query for Inner Join
how shall I make Query to GraphQL for inner join of 3 tables within same data source?
I have to get List of Fields from SQL DB from 3 different tables within same server.
I am passing Query from UI(...
0
votes
0
answers
36
views
How to change root activity name in .NET HotChocolate for Elastic APM using a CustomActivityEnricher?
I am trying to change the root activity name in .NET HotChocolate for Elastic APM by creating a custom activity enricher and overriding the CreateRootActivityName method.
public class ...
-2
votes
0
answers
13
views
I follow this query for image upload in graphql with nodejs, but i didn't get file in my mutation [closed]
enter image description here
Please give me the solution, if you have.
-1
votes
2
answers
53
views
How to change/customize the response format of Lighthouse?
I am using Lighthouse GraphQL with Laravel 9 for my application. Graphql have standard format and each response show under the data and operation name. It does not show proper response (error/success) ...
0
votes
0
answers
31
views
How to map nested object query in Spring graphql
Using org.springframework.boot:spring-boot-starter-graphql and WebMvc, I would like to handle, in the @Controller, nested fields.
Schema:
type Movie {
name: String
actor: Actor
}
type Actor {
...
0
votes
0
answers
15
views
Spring boot GraphiQL define parent and child
I am using GraphiQL with spring boot for creating services. I have a scenario where I have some fields common to 2 to 3 classes.
type Parent {
field1: String
field2: String
}
#should have field1 ...
0
votes
0
answers
18
views
How can I map timestamp with zone type to spring boot JPA entity class column property and graphql schema?
I have a timestamp with zone type column in Pstgresql database table. I want to map in spring boot JPA entity class and graphql schema file.
The timestamp with zone looks like "2022-11-17 15:18:...
0
votes
0
answers
23
views
UI Table of Data not updating after useMutation Update/Edit data
Description
i'm working on reactjs and apollo client project. i'm also developing editUser feature. edit mutation is working but table UI data not update. i want to update data in the table after Edit ...
0
votes
0
answers
20
views
Is it a must to setup Cloudflare firewall rules to retrieve firewall events?
I am new to Cloudflare Graphql. I am trying to use Cloudflare Graphql to retrieve firewall events of a domain using code below.
{
viewer {
zones(filter: { zoneTag: $zoneTag }) {
...
0
votes
0
answers
19
views
react storybook Apollo client mock useLazyQuery response
I am trying to mock useLazyQuery hook response from Apollo client in storybooks. It works fine if we try to mock the query following the official docs but could not find a way to mock useLazyQuery ...