Fetch and print the GraphQL schema from a GraphQL HTTP endpoint. (Can be used for Relay Modern.)
Note: Consider using
graphql-cli
instead for improved workflows.
#!/bin/fish | |
# clones my dotfiles. If you are using this, fork this and add the link to you own dotfiles | |
# https://www.atlassian.com/git/tutorials/dotfiles | |
git clone --bare idkjs/dotfiles.git "$HOME/.dotfiles" | |
function dotfiles | |
/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" "$argv" | |
end | |
mkdir -p .dotfiles-backup | |
# dotfiles checkout | |
if [ (dotfiles checkout) = 0 ] |
#!/bin/fish | |
# https://www.atlassian.com/git/tutorials/dotfiles | |
# initialize bare repository | |
git init --bare "$HOME/.dotfiles" | |
# create a local alias for dotfiles so we can run it here in init script | |
alias dotfiles '/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' | |
# run our dotfiles alias to configure git to not show untracked files | |
dotfiles config --local status.showUntrackedFiles no | |
# echo "function dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> "$HOME/.config/fish/conf.d/dotfiles.fish" |
open Relude.Globals; // I usually do this in bsconfig | |
type user = { | |
firstName: string, | |
lastName: string, | |
}; | |
type error = | |
| AlreadyLoggedIn; | |
type context = { |
#!/usr/bin/env sh | |
sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" |
query IntrospectionQuery { | |
__schema { | |
queryType { | |
name | |
} | |
mutationType { | |
name | |
} | |
subscriptionType { | |
name |
// https://twitter.com/reasonml/status/1238026671581622272?s=20 | |
// https://gist.github.com/chenglou/b6cf738a5d7adbde2ee008eb93117b49 | |
// This is a proper alternative to | |
// https://github.com/BuckleScript/bucklescript/blob/b9508105b1a35537bdea9a1fabd10f6c65f776b4/jscomp/bsb/templates/react-hooks/src/FetchedDogPictures/FetchedDogPictures.re#L14 | |
// The one in that file uses Promise, but that's *wrong*. | |
// We only used promise as a demo of its API. We'll remove it soon. | |
// As you can see below, the pure XMLHttpRequest code is just as clean, | |
// less mysterious for all, more performant, extensible, and actually correct. |
// https://twitter.com/reasonml/status/1238026671581622272?s=20 | |
// https://gist.github.com/chenglou/b6cf738a5d7adbde2ee008eb93117b49 | |
// This is a proper alternative to | |
// https://github.com/BuckleScript/bucklescript/blob/b9508105b1a35537bdea9a1fabd10f6c65f776b4/jscomp/bsb/templates/react-hooks/src/FetchedDogPictures/FetchedDogPictures.re#L14 | |
// The one in that file uses Promise, but that's *wrong*. | |
// We only used promise as a demo of its API. We'll remove it soon. | |
// As you can see below, the pure XMLHttpRequest code is just as clean, | |
// less mysterious for all, more performant, extensible, and actually correct. |
module Colors = { | |
type sectionColors = { | |
primary: string, | |
header: string, | |
}; | |
type mainColors = { | |
primary: string, | |
header: string, | |
}; |
Fetch and print the GraphQL schema from a GraphQL HTTP endpoint. (Can be used for Relay Modern.)
Note: Consider using
graphql-cli
instead for improved workflows.
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j