Tag: graphql
-
Amplify sort property from a model
0 I’m using graphql from amplify I have a 2 models Conversation and Message. Message model belongs to Conversation (conversation has many messages) So when I get Conversation by some criteria I want my messages to be sorted based on created at property. Is there a way to do that? sorting graphql aws-amplify Share Improve…
-
Track image upload progress in graphql mutation
0 I am running a graphql mutation to upload an image to the server. And operation is done successfully. My only question is that how do i track the progress of image upload on frontend? What percentage of the image size is uploaded? I want to show it in the progressbar in the frontend. Below…
-
What’s the advantages of pre-fetching the GraphQL schema when we can manually pass data to request body?
0 Foreword: I am completely new to GraphQL so I am just trying to figure out what is the best practice when working with it So I need to call a GraphQL API written in Nestjs (more specifically, from a Rails server). There is this nice gem graphql-client that makes a Client to communicate with…
-
What is the npm command to build and create package of Apollo Grapphql server application?
0 What is the npm command to build and create package of Apollo Grapphql server application? I am using nodemon start command to run the application. But I want to create package and publish it in the server. Which npm command we can use for build and packaging? I am using nodemon start command to…
-
fetch graphql query from external server
0 i’m trying to fetch some leetcode stats using leetcode’s graphql schema. when i enter the query in the browser, it gives me a response, but it’s not responding to me when i use axios. here’s the query i enter in the browser: https://leetcode.com/graphql?query=query { questionSubmissionList( offset: 0, limit: 20, questionSlug: "two-sum" ) { lastKey…
-
aiohttps: ValueError: Newline or carriage return character detected in HTTP status message or header. This is a potential security issue
0 I am using gql to run a query against a GraphQL API. I get this error: File "<path to poetry venv>/lib/python3.10/site-packages/aiohttp/http_writer.py", line 129, in write_headers buf = _serialize_headers(status_line, headers) File "aiohttp/_http_writer.pyx", line 132, in aiohttp._http_writer._serialize_headers File "aiohttp/_http_writer.pyx", line 116, in aiohttp._http_writer._safe_header ValueError: Newline or carriage return character detected in HTTP status message or header.…
-
Argument passed into graphql mutation is always undefined
0 Learning graphql, cannot get mutation to work yet, get lost on the online examples. import express from ‘express’ import cors from ‘cors’ import { graphqlHTTP } from ‘express-graphql’ import { makeExecutableSchema } from ‘@graphql-tools/schema’ const app = express() const port = 4000 // In-memory data store const data = { warriors: [ { id:…
-
How to form a GitHub GraphQL API query to compare between branches, e.g., compare MASTER and SAMPLE_12 to get all commits for potential Pull Request?
0 Looking for a GraphQl query to search for a list of all commits when comparing between two branches on GitHub within a repository. For example, https://github.com/account-test/repo-test/compare/main…development will render all the commits, if any. How to get the list of all commits when comparing between two branches using the GitHub GraphQL API? I tried query…
-
AppSync subscriptions with ApolloClient in React
8 I’m currently using ApolloClient to connect to an AppSync GraphQL API. It all works perfectly for queries and mutations, but I’m having some trouble getting subscriptions to work. I’ve followed the Apollo docs and my App.js looks like this: import React from ‘react’; import ‘./App.css’; import { ApolloClient } from ‘apollo-client’; import { ApolloProvider…
-
Get info about several repositories from Github Graphql API in a single call
6 I am trying to create a query to Github GraphQL API that receive a list of repos as a parameter, and returns the info of those repositories in a single API call, does anyone know how to do that? Something like this (I know this doesn’t work) query myOrgRepos($repos: [String!]!) { search(query:””” repo in…