What does the “operation name” reference?

In GraphiQL you can choose from a list of queries specified by the operation name. Here’s some screenshots to help make this make sense. When you have two mutations / queries side-by-side and they don’t have an operation name you can’t run them. When they have operation names they can be listed when you click … Read more

GitHub API v4: How can I traverse with pagination? (GraphQL)

According to graphql documentation there are more than one pagination model. GitHub is using complete connection model In this model you can traverse with adding after:”Y3Vyc29yOjEwMA==” to your search query. query { search(first: 100, after:”Y3Vyc29yOjEwMA==”, type:USER, query:”location:usa repos:>0 language:java”) { pageInfo { startCursor hasNextPage endCursor } userCount nodes { … on User { bio company … Read more

GraphQL or REST [closed]

This question is primarily opinion-based. But from my experience: Multiple requests on a RESTful-API for just one thing often indicates a lack in the API design, namely the needed resource was not available and therefore stuff needs to be gathered from different resources to compensate for this. A REST-API that could be easily replaced by … Read more

How to refresh JWT token using Apollo and GraphQL

The example given in the the Apollo Error Link documentation is a good starting point but assumes that the getNewToken() operation is synchronous. In your case, you have to hit your GraphQL endpoint to retrieve a new access token. This is an asynchronous operation and you have to use the fromPromise utility function from the … Read more

Reusable Gatsby-Image Component with dynamic image sources

This may answer your question: The final code: import React from ‘react’; import { StaticQuery, graphql } from ‘gatsby’; import Img from ‘gatsby-image’; // Note: You can change “images” to whatever you’d like. const Image = props => ( <StaticQuery query={graphql` query { images: allFile { edges { node { relativePath name childImageSharp { fluid(maxWidth: … Read more

GitHub GraphQL equivalent of the contents API

After some digging, found it: query { repository(name: “repoName”, owner: “repoOwner”) { object(expression: “branch:path/to/file”) { … on Blob { text } } } } The argument passed to expression on the object field is actually a git revision expression suitable for rev-parse, so I guess you can have fun with it to do advanced querying. … Read more

Result of a delete mutation?

I don’t think a clear de facto standard exists as of July, 2017, and I see a lot of differences between implementations (GitHub, Yelp, GraphCool, Shopify). However, if you look at some of recent GraphQL APIs to come out, there seems to be a common trend. Largely, the input type and response type are specific … Read more

What is the difference between GraphQL and SPARQL?

Context Datatourisme is a platform that allows to publish (via the Producteur component) and to consume (via the Diffuseur component) POI-related open data. It seems you have linked to a particular application developed over Diffuseur with a help of GraphQL Voyager. The application illustrates capabilities of the GraphQL API exposed by Diffuseur. The API documentation … Read more

Jest has detected the following 1 open handle potentially keeping Jest from exiting: TCPSERVERWRAP

I still haven’t found a perfect solution, but for the moment I went for this workaround : jest –config ./test/jest-e2e.json –forceExit The –forceExit option kill the openHandles somehow and unlock everything. Yet, I’m still looking for the “proper way” of handling that issue.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)