Skip to content

Instantly share code, notes, and snippets.

Hafiz Ismail sogko

Block or report user

Report or block sogko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

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:

View graphql_shorthand_notation_cheatsheet_overview.txt
// 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
@sogko
sogko / main.go
Last active Jan 21, 2017
Example of creating custom `graphql-go/handler` using `handler.NewRequestOptions()` to parse http.Requests
View main.go
package main
import (
"encoding/json"
"net/http"
"github.com/graphql-go/graphql"
"github.com/graphql-go/handler"
"github.com/graphql-go/relay/examples/starwars"
)
@sogko
sogko / main.go
Last active Mar 10, 2016
Example of using graphql-go/handler with a custom JWT middleware
View main.go
package main
import (
"net/http"
"log"
"github.com/graphql-go/handler"
"github.com/graphql-go/relay/examples/starwars"
)
View schema.go
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"`
@sogko
sogko / SassMeister-input.scss
Created Nov 24, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
$viewportIncrement: 1px;
$small: 480px;
$postSmall: $small + $viewportIncrement;
.test {
width: $viewportIncrement;
@sogko
sogko / main.go
Last active Nov 18, 2019
[graphql-go] Mutation example with `graphql-go/handler`
View main.go
package main
import (
"github.com/graphql-go/graphql"
"github.com/graphql-go/handler"
"net/http"
)
type Todo struct {
ID string `json:"id"`
@sogko
sogko / main.go
Last active Jan 20, 2017
[graphql-go] Mutation example
View main.go
package main
import (
"github.com/graphql-go/graphql"
"github.com/kr/pretty"
)
type Todo struct {
ID string `json:"id"`
Text string `json:"text"`
@sogko
sogko / test.js
Created Nov 2, 2015
graphql-go #35
View test.js
import {
GraphQLSchema,
GraphQLObjectType,
GraphQLString,
GraphQLNonNull,
GraphQLList,
GraphQLBoolean,
GraphQLInt,
GraphQLFloat,
GraphQLEnumType,
@sogko
sogko / App.js
Last active Oct 14, 2015
hello-world-relay-part-1 - RelayJS App
View App.js
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>
You can’t perform that action at this time.