Authorization: Bearer CZhtkLDpNYXgPH9Ml6shqh2OwykChw
Authorization: Bot MTk4NjIyNDgzNDcxOTI1MjQ4.Cl2FMQ.ZnCjm1XVW7vRze4b7Cq4se7kKWs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
__schema { | |
mutationType{ | |
fields { | |
name | |
args{ | |
name | |
type { | |
...TypeDesc | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"__schema": { | |
"mutationType": { | |
"fields": [ | |
{ | |
"name": "addItemToCart", | |
"args": [ | |
{ | |
"name": "input" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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}"}}}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
require('./index.html'); | |
require('./style.css'); | |
var Elm = require('./Main.elm'); | |
Elm.Main.embed(document.getElementById('main')); | |
/// index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# subscription | |
subscription do | |
field :new_user, :user do | |
config fn _args, _info -> | |
{:ok, topic: "*"} | |
end | |
end | |
end |