Skip to content

Instantly share code, notes, and snippets.


Tony Ghita tonyghita

View GitHub Profile

Recommended GraphQL talks

This is not an exhaustive list, but should be enough to get you started.

Lee Byron - Exploring GraphQL (2015)

Lee explores GraphQL's core principles, how it works, and what makes it a great tool.


Keybase proof

I hereby claim:

  • I am tonyghita on github.
  • I am tonyghita ( on keybase.
  • I have a public key ASAa8WiU7sdrLDQBBaKZDy0GcKlTixkGisXB9csn5bourgo

To claim this, I am signing this object:

tonyghita / dataloader_resolver.go
Last active Jan 29, 2018
Example integration of graphql-go resolvers and dataloader
View dataloader_resolver.go
type RootResolver struct {
UsersClient users.client
type UserResolver struct {
id string // We can forgo a user lookup in the case a field resolvers only needs the user's id (e.g. fetching a user's friends).
load dataloader.Thunk // call this function to load user for field resolution
// loadUsers gets passed to the request-specific dataloader as the batch function
View routes.js
if (devMiddleware) {
app.get('*', (req, res) => {
res.write(devMiddleware.fileSystem.readFileSync(path.join(__dirname, '../..', 'build', 'index.html')))
} else {
app.use(express.static(path.join(__dirname, '../..', 'build')))
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '../..', 'build', 'index.html'))
View bootstrap-masonry-template.htm
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href=",700">
tonyghita / .gitconfig
Created Aug 29, 2014
Alias for checkout out pull-requests locally
View .gitconfig
co-pr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1' -
tonyghita / prepare-commit-msg
Created Jun 25, 2012
git hook which prepends the branch name to the commit message
View prepare-commit-msg
#!/usr/bin/env ruby
branchname = `git describe --contains --all HEAD`
message_file = ARGV[0]
message =, 'w') {|f| f.write branchname + message }