Skip to content

Instantly share code, notes, and snippets.

View zacck-zz's full-sized avatar
Lemur Heavy

Zacck Osiemo zacck-zz

Lemur Heavy
View GitHub Profile

Authorization: Bearer CZhtkLDpNYXgPH9Ml6shqh2OwykChw

Authorization: Bot MTk4NjIyNDgzNDcxOTI1MjQ4.Cl2FMQ.ZnCjm1XVW7vRze4b7Cq4se7kKWs

{
__schema {
mutationType{
fields {
name
args{
name
type {
...TypeDesc
}
{
"data": {
"__schema": {
"mutationType": {
"fields": [
{
"name": "addItemToCart",
"args": [
{
"name": "input"
#
# example Dockerfile for https://docs.docker.com/engine/examples/postgresql_service/
#
FROM ubuntu
# Add the PostgreSQL PGP key to verify their Debian packages.
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
@zacck-zz
zacck-zz / test.exs
Last active September 10, 2018 10:43
# set up a subscription
ref = push_doc(socket, subscription)
assert_reply(ref, :ok, %{subscriptionId: subscription_id})
# run a mutation
assert %{data: %{"signup" => %{"username" => u_name, "id" => id}}} =
run!(mutation, variables: variables)
expected = %{
result: %{ data: %{ "newUser" => %{ "username" => "#{u_name}", "id" => "#{id}"}}},
'use strict';
require('./index.html');
require('./style.css');
var Elm = require('./Main.elm');
Elm.Main.embed(document.getElementById('main'));
/// index.html
var path = require('path');
module.exports = {
// If your entry-point is at "src/index.js" and
// your output is in "/dist", you can ommit
// these parts of the config
module: {
rules: [{
test: /\.html$/,
exclude: /node_modules/,
defmodule ApiWeb.SubscriptionCase do
@moduledoc """
This module contains the setup cases for subscriptions tests in the Application
"""
use ExUnit.CaseTemplate
using do
quote do
use ApiWeb.ChannelCase
use Absinthe.Phoenix.SubscriptionTest,
@zacck-zz
zacck-zz / ex.ex
Last active September 7, 2018 08:47
# subscription
subscription do
field :new_user, :user do
config fn _args, _info ->
{:ok, topic: "*"}
end
end
end