Skip to content

Instantly share code, notes, and snippets.

View bonham000's full-sized avatar

Sean Smith bonham000

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bonham000 on github.
  • I am bonham000 (https://keybase.io/bonham000) on keybase.
  • I have a public key ASD0b171EV1FMfVdOz9AHc4ooSFgvvNX2TMD82-pHXgf5go

To claim this, I am signing this object:

type Query {
user: User
}
type User {
id: String
email: String
firstName: String
middleName: String
lastName: String
import React from "react";
import { compose } from "react-apollo";
import { Button, TextInput } from "react-native";
import { Screen } from "src/ui";
import { UserQueryResponse } from "src/graphql/responses";
import { Success, UpdateUserInfoMutationArgs } from "src/graphql/types";
import { withUpdateUserInfoMutation, withUser } from "src/graphql/helpers";
interface ComponentProps {
@bonham000
bonham000 / sample-query
Created May 27, 2019 07:44
Sample GraphQL Query
query {
user {
name
}
posts {
id
text
author
}
comments {
@bonham000
bonham000 / basic-graphql-schema
Last active May 27, 2019 07:44
Sampel GraphQL Schema
type Query {
user: User
posts: [Post]
comments: [Comment]
}
type User {
id: ID!
name: String!
email: String!
{
"data": {
"user": {
"name": "Steve"
},
"posts": null,
"comments": null
},
"errors": [
{
{"claims":[{"url":"http://35.237.97.22","timestamp":1578835190,"type":"ATTESTATION_SERVICE_URL"},{"timestamp":1578835202,"type":"ACCOUNT","address":"0x9abD6739153D95512D0d68eC0960d296E2F174Bc"}],"meta":{"address":"0x575240f049AEa7bC783F60Bebd7fCb5584a54B4A","signature":"0x5c912be45d77d03526a2bb25549673923a8de763d1960198f03ade3f71edf9ae1ff388618d0a9d54cc752086a1b1f80ef4e0cba88eb6fb2304642dc5e8c3614a1b"}}
{"claims":[{"url":"http://35.237.97.22","timestamp":1578835190,"type":"ATTESTATION_SERVICE_URL"},{"timestamp":1578835202,"type":"ACCOUNT","address":"0x9abD6739153D95512D0d68eC0960d296E2F174Bc"}],"meta":{"address":"0x575240f049AEa7bC783F60Bebd7fCb5584a54B4A","signature":"0x5c912be45d77d03526a2bb25549673923a8de763d1960198f03ade3f71edf9ae1ff388618d0a9d54cc752086a1b1f80ef4e0cba88eb6fb2304642dc5e8c3614a1b"}}
{"claims":[{"timestamp":1578836029,"type":"ACCOUNT","address":"0x575240f049AEa7bC783F60Bebd7fCb5584a54B4A"}],"meta":{"address":"0x9abD6739153D95512D0d68eC0960d296E2F174Bc","signature":"0x642bd3122fc89b2b0c04340613423d75f8e1473e5bc063f984a3e86fbb444d8b6ea3cd56fc7813645250ea6fdb1f21a7f461a092734ed6b7f415af7591be82de1b"}}
@bonham000
bonham000 / typescript-snippets.ts
Last active September 28, 2021 13:20
TypeScript Snippets
/** ===========================================================================
* TypeScript Result type!
*
* This is a Result type inspired by Rust.
*
* Reference: https://doc.rust-lang.org/rust-by-example/error/result.html
*
* The Result type allow type checking on operations which may fail, since
* in TypeScript there is no way to convey type information in functions which
* may "throw" an error.