Skip to content

Instantly share code, notes, and snippets.

View mathdroid's full-sized avatar
☢️
not good, not terrible

Odi mathdroid

☢️
not good, not terrible
View GitHub Profile
@mathdroid
mathdroid / tutorial.md
Created July 19, 2018 06:03 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@mathdroid
mathdroid / absolute-to-relative.js
Created June 28, 2021 11:57 — forked from benmerckx/absolute-to-relative.js
jscodeshift codemod to change imports of internal modules using absolute path to relative path
//jscodeshift --rootDirs ./src --packageDir . --extensions ts --parser tsx -t abs.js src
/**
* This codemod expects 2 CLI arguments:
* - packageDir: the path of the directory containing the package.json. It's used to detect whether a path points
* to a dependency or an internal module.
* - rootDirs: root directory paths separated by a comma if you have more than one root.
* Let's say that you have two files:
* - src/component.js
* - src/index.js containing the import "import Component from 'component.js';"