| import graphql.ExecutionResult; | |
| import graphql.GraphQLError; | |
| import graphql.execution.instrumentation.InstrumentationContext; | |
| import graphql.execution.instrumentation.InstrumentationState; | |
| import graphql.execution.instrumentation.SimpleInstrumentation; | |
| import graphql.execution.instrumentation.SimpleInstrumentationContext; | |
| import graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters; | |
| import graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters; | |
| import graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters; |
| /** | |
| * Metro configuration for React Native | |
| * https://github.com/facebook/react-native | |
| * | |
| * @format | |
| */ | |
| const path = require('path'); | |
| module.exports = { |
| import { ApolloServer, gql } from 'apollo-server-micro'; | |
| const typeDefs = gql` | |
| type Query { | |
| sayHello: String | |
| } | |
| `; | |
| const resolvers = { | |
| Query: { |
| @echo off | |
| REM Make sure that the path to the script is correct! | |
| @bash -l -c "~/bin/gitkraken-wsl-bash.sh %*" |
This primer is licensed under your choice of MIT or CC0, do whatever you want.
BUT do note that this can be updated, so leave a link here so readers can see the updated information themselves.
1.13 and 1.14 are lumped together in this doc, you're on your own if you just want to go to 1.13 and not 1.14, for some reason.
1.15 stuff: https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e
ResourceLocationnow throw on non-snake-case names instead of silently lowercasing for you, so you probably should go and change all those string constants now. More precisely, domains must only contain alphanumeric lowercase, underscore (_), dash (-), or dot (.). Paths have the same restrictions, but can also contain forward slashes (/).
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
| #!/usr/bin/env ruby | |
| # ./apib2httpsnippets | |
| # Author: Max Novakovic | |
| # Email: max@lateral.io | |
| require 'awesome_print' | |
| require 'json' | |
| require 'fileutils' | |
| require 'uri' |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
- It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
- It is free, with no quotas.
- Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.