I hereby claim:
- I am sogko on github.
- I am sogko (https://keybase.io/sogko) on keybase.
- I have a public key ASD0R6VsTfZSI37_2wKvxjFy4ES_Qltu2-sJRunyNzzA-Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // GraphQL Shorthand Notation Cheatsheet | |
| // - Read the full article at: https://wehavefaces.net/graphql-shorthand-notation-cheatsheet-17cd715861b6 | |
| Schema | |
| ======= | |
| GraphQL Schema => schema | |
| Built-in scalar types |
| package main | |
| import ( | |
| "encoding/json" | |
| "net/http" | |
| "github.com/graphql-go/graphql" | |
| "github.com/graphql-go/handler" | |
| "github.com/graphql-go/relay/examples/starwars" | |
| ) |
| package main | |
| import ( | |
| "net/http" | |
| "log" | |
| "github.com/graphql-go/handler" | |
| "github.com/graphql-go/relay/examples/starwars" | |
| ) |
| package graphql | |
| type Resources struct { | |
| } | |
| type Resource struct { | |
| ID string `json:"id"` | |
| Total float64 `json:"total"` | |
| Used float64 `json:"used"` | |
| When time.Time `json:"when"` |
| // ---- | |
| // libsass (v3.2.5) | |
| // ---- | |
| $viewportIncrement: 1px; | |
| $small: 480px; | |
| $postSmall: $small + $viewportIncrement; | |
| .test { | |
| width: $viewportIncrement; |
| package main | |
| import ( | |
| "github.com/graphql-go/graphql" | |
| "github.com/graphql-go/handler" | |
| "net/http" | |
| ) | |
| type Todo struct { | |
| ID string `json:"id"` |
| package main | |
| import ( | |
| "github.com/graphql-go/graphql" | |
| "github.com/kr/pretty" | |
| ) | |
| type Todo struct { | |
| ID string `json:"id"` | |
| Text string `json:"text"` |
| import { | |
| GraphQLSchema, | |
| GraphQLObjectType, | |
| GraphQLString, | |
| GraphQLNonNull, | |
| GraphQLList, | |
| GraphQLBoolean, | |
| GraphQLInt, | |
| GraphQLFloat, | |
| GraphQLEnumType, |
| import React from 'react'; | |
| import Relay from 'react-relay'; | |
| // Your React component | |
| class App extends React.Component { | |
| render() { | |
| return ( | |
| <div> | |
| <h1>{this.props.latestPost.text}</h1> | |
| </div> |