graphql

How to use Gatsby to display a folder of images and markdown files

走远了吗. 提交于 2021-01-29 05:50:36
问题 So I'm very new to Gatsby, react, GraphQL, etc. In the past I've used pure CSS, HTML, and javascript to make my sites. Although, I was interested in Gatsby and the capabilities of it, so I decided to challenge myself and learn it. I'm putting together a portfolio site for myself and for ease of updating, I would like to be able to add new projects through creating new folders, running a build script, and dropping the built site into my FTP. This is how my folder structure for projects is set

How to update a issue or PR comment in Github using curl and a GraphQL updateIssueComment mutation

夙愿已清 提交于 2021-01-29 05:33:15
问题 I want to update a comment in a Github PR or issue and I found it hard to find a working example. That's why I ask this question, to answer it myself. Hopefully someone else can use this. 回答1: The following snippet will update an issue or PR comment using a GraphQL mutation and curl. Make sure you replace <REPLACE WITH YOUR GITHUB PERSONAL ACCESS TOKEN> with an access token that has repo scope on the repo in which the PR/issue appears. Then replace the REPLACE WITH COMMENT NODE ID with the

How to compare two branches in github with GraphQL?

社会主义新天地 提交于 2021-01-29 05:15:15
问题 Can we compare two branches with the Github GraphQL? From their v3 rest API, you can do: /repos/:owner/:repo/compare/:base...:head (docs: https://developer.github.com/v3/repos/commits/#compare-two-commits) and this works with SHA's, branches, tags, etc. However, I'm unable to find it's equivalent GraphQL query in the docs. This is my attempt so far : I'm able to get the list of commits for each branch seperately, however, the entire history is loaded and I would only like the difference

GraphQL - Execute sub query conditionally

故事扮演 提交于 2021-01-29 04:01:33
问题 I'm trying to optimise the query executed by some of my react components that are shared across the whole app, such as Footer and Header components. I'm trying not to fetch the Student Solution details when the variable institutionPath is not provided. query organisationAndInstitution($organisationName: String!, $institutionPath: String!, $fetchInstitution: Boolean!){ organisation(where: { name: $organisationName }){ name } studentSolutionRelationships(where:{ AND: [ { status: PUBLISHED }, {

GraphQL and Graphene

别说谁变了你拦得住时间么 提交于 2021-01-29 03:34:54
问题 I have a database schema that has a one to many relationship. For e.g. one department has many customer. Is it possible to have a mutation that create a customer and a department and associate them? Or the correct way is to create a customer than a department and then associate each other? In the second approach I need to make three trips instead of one. Can someone provide me a GraphQL handling this situation? 回答1: You can define your mutation input to support nested types. This will allow

How to consume GraphQL API from Nativescript Core application?

跟風遠走 提交于 2021-01-29 03:21:28
问题 I am trying to consume GraphQL ApI from nativescript core application but whole docs and tutorials are around nativescript angular and apollo. Is it possible?, any recommendations about how to start? 回答1: It works fine with apolli-client as @Manoj recommended 来源: https://stackoverflow.com/questions/57237305/how-to-consume-graphql-api-from-nativescript-core-application

AppSync batch call for nested properties

半腔热情 提交于 2021-01-29 02:48:27
问题 My backend REST API takes a list of id 's and returns a list of, say, Person objects whose id was requested. Each Person has a children property, which is a list of Person.id . A nice family tree. // GET /id/[1,2] { "id": 1, "name": "Jacob", "children": [3, 4] }, { "id": 2, "name": "Jack", "children": [5, 6] } Using AppSync to front said API, I have a resolver for children that makes a call to my API using the following template: #set( $myMap = { "id" : $context.source.children } ) { "version

Advice on building graphQL queries in c#

与世无争的帅哥 提交于 2021-01-29 00:09:43
问题 I am working on a data migration project - API to API. The destination API is graphQL, we have a number of objects to push into the destination and the shapes vary so I am looking for some advice on how best to dynamically build mutations/queries specifically in c#. Currently we are just using templates and using find/replace routines to inject values. While this approach does work as the shapes of the data vary this becomes evermore complex and inelegant. I am looking for any advice/pointers

Advice on building graphQL queries in c#

ぃ、小莉子 提交于 2021-01-29 00:08:44
问题 I am working on a data migration project - API to API. The destination API is graphQL, we have a number of objects to push into the destination and the shapes vary so I am looking for some advice on how best to dynamically build mutations/queries specifically in c#. Currently we are just using templates and using find/replace routines to inject values. While this approach does work as the shapes of the data vary this becomes evermore complex and inelegant. I am looking for any advice/pointers

Advice on building graphQL queries in c#

大兔子大兔子 提交于 2021-01-29 00:04:37
问题 I am working on a data migration project - API to API. The destination API is graphQL, we have a number of objects to push into the destination and the shapes vary so I am looking for some advice on how best to dynamically build mutations/queries specifically in c#. Currently we are just using templates and using find/replace routines to inject values. While this approach does work as the shapes of the data vary this becomes evermore complex and inelegant. I am looking for any advice/pointers