Skip to content

Instantly share code, notes, and snippets.

@jbaxleyiii
Created January 4, 2018 11:58
Show Gist options
  • Select an option

  • Save jbaxleyiii/949456aa1cbfe05598454c3cbace7ac0 to your computer and use it in GitHub Desktop.

Select an option

Save jbaxleyiii/949456aa1cbfe05598454c3cbace7ac0 to your computer and use it in GitHub Desktop.
type author = {. "id": int, "firstName": string, "lastName": string};
let authors = [|
{"id": 1, "firstName": "Tom", "lastName": "Coleman"},
{"id": 2, "firstName": "Sashko", "lastName": "Stubailo"},
{"id": 3, "firstName": "Mikhail", "lastName": "Novikov"}
|];
type post = {. "id": int, "authorId": int, "title": string, "votes": ref(int)};
let posts = [|
{"id": 1, "authorId": 1, "title": "Introduction to GraphQL", "votes": ref(2)},
{"id": 2, "authorId": 2, "title": "Welcome to Apollo", "votes": ref(3)},
{"id": 3, "authorId": 2, "title": "Advanced GraphQL", "votes": ref(1)},
{"id": 4, "authorId": 3, "title": "Launchpad is Cool", "votes": ref(7)}
|];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment