I hereby claim:
- I am maartenvanvliet on github.
- I am maartenvanvliet (https://keybase.io/maartenvanvliet) on keybase.
- I have a public key ASAiGTlG3pGbGtaEU5tVYunmE__A1RubkwGJfRBZjCR9eAo
To claim this, I am signing this object:
# https://productionreadygraphql.com/2020-08-01-guide-to-graphql-errors | |
defmodule Absinthe.ErrorInterfaceTest do | |
use Absinthe.Case, async: true | |
defmodule TestSchema do | |
use Absinthe.Schema | |
query do | |
field :foo, :string |
defmodule SkipIntrospection do | |
@behaviour Absinthe.Phase | |
def run(doc, options \\ []) do | |
node = Absinthe.Blueprint.prewalk(doc, &handle_node/1) | |
{:ok, node} | |
end | |
defp handle_node(%Absinthe.Blueprint.Document.Operation{} = node) do | |
selections = |
defmodule Absinthe.Type.BuiltIns.SpecCompliantInt do | |
use Absinthe.Schema.Notation | |
@moduledoc false | |
scalar :integer, name: "Int" do | |
description """ | |
The `Int` scalar type represents non-fractional signed whole numeric | |
values between `-2^31` and `2^31 - 1` as outlined in the | |
[GraphQl spec](ttps://spec.graphql.org/October2021/#sec-Int). |
defmodule GraphqlService.Schema.IntrospectBlocker do | |
# by https://github.com/sb8244 | |
@behaviour Absinthe.Middleware | |
def call(resolution, _config) do | |
case Absinthe.Resolution.path(resolution) |> IO.inspect do | |
["__schema" | _] -> | |
%{resolution | errors: ["__schema introspection is disabled"] } | |
["__type" | _] -> |
defmodule SimplePlug.Handle do | |
@behaviour Plug | |
@behaviour PlugWebhook | |
def init(options) do | |
# initialize options | |
options | |
end |
defmodule CloudfrontSigner do | |
def signed_url(cloudfront_key_pem, key_pair, url, expiry_time) do | |
decoded_key = cloudfront_key_pem |> decode_key | |
expiry_time = :os.system_time(:second) + expiry_time | |
policy = policy(url, expiry_time) | |
signature = | |
:public_key.sign(policy, :sha, decoded_key) | |
|> Base.encode64() | |
|> String.replace("+", "-") |
I hereby claim:
To claim this, I am signing this object:
#First differences, NA for first value | |
diff_na <- function(vector){ | |
return c(NA, diff(value)) | |
} | |
#Renames column | |
col.mv <- function(dataframe, old_name, new_name){ | |
names(dataframe)[names(dataframe)==old_name] <- new_name | |
return dataframe | |
} |