This file contains 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
➜ graphql-js git:(jannis/fix-cyclic-imports) ✗ yarn test | |
yarn run v1.3.2 | |
$ npm run lint && npm run check && npm run testonly | |
> @jannispohlmann/graphql@0.13.1 lint /Users/jannis/Work/oss/graphql/graphql-js | |
> eslint --rulesdir ./resources/lint src || (printf '\033[33mTry: \033[7m npm run lint -- --fix \033[0m\n' && exit 1) | |
> @jannispohlmann/graphql@0.13.1 check /Users/jannis/Work/oss/graphql/graphql-js | |
> flow check |
This file contains 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/functionalfoundry/graphqlws" | |
"github.com/graphql-go/graphql" | |
"github.com/graphql-go/graphql/language/ast" | |
"github.com/graphql-go/handler" |
This file contains 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
package main | |
import ( | |
"net/http" | |
"github.com/functionalfoundry/graphqlws" | |
"github.com/graphql-go/graphql" | |
"github.com/graphql-go/handler" | |
) |
This file contains 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
// This assumes you have access to the above subscription manager | |
subscription := subscriptionManager.Subscriptions() | |
for _, conn := range subscriptions { | |
// Things you have access to here: | |
conn.ID() // The connection ID | |
conn.User() // The user returned from the subscription manager's Authenticate | |
for _, subscription := range subscriptions[conn] { | |
// Things you have access to here: |
This file contains 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
package main | |
import ( | |
"net/http" | |
"github.com/functionalfoundry/graphqlws" | |
"github.com/graphql-go/graphql" | |
) | |
func main() { |
This file contains 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
/* GraphQlTag.re */ | |
type query; | |
type gql = (string => query) [@bs]; | |
external gql : string => query = "default" [@@bs.module "graphql-tag"]; | |
let gql = gql; |
This file contains 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
~/W/w/macros (master↑1|✔) $ boot pom | |
java.lang.Thread.run Thread.java: 745 | |
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 617 | |
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1142 | |
java.util.concurrent.FutureTask.run FutureTask.java: 266 | |
... | |
clojure.core/binding-conveyor-fn/fn core.clj: 2027 | |
boot.core/boot/fn core.clj: 1030 | |
... | |
boot.core/construct-tasks core.clj: 992 |
This file contains 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
;; Query: A vector of keywords (e.g. [:foo :bar]) | |
(defmacro with-query-bindings | |
"Binds names derived from a query to the results for the query. | |
E.g. the query [:foo :bar] is turned into | |
(let [{foo :foo bar :bar} <query result>] | |
<body>)" | |
[query query-result & body] | |
(let [bindings (query-bindings query)] |
This file contains 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
;;;; Deep destructuring characteristics | |
;; Regular properties | |
Query: [a b] | |
Result: {:a <aval> :b <bval>} | |
Bindings: | |
a -> <aval> | |
b -> <bval> |
This file contains 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
boot.user=> (clojure.spec/def ::foo (clojure.spec/with-gen ::bar #(clojure.spec.gen/symbol))) | |
:boot.user/foo | |
boot.user=> (clojure.spec/describe :boot.user/foo) | |
:clojure.spec/unknown | |
boot.user=> (clojure.spec/def ::bar symbol?) | |
:boot.user/bar | |
boot.user=> (clojure.spec/describe :boot.user/foo) | |
:clojure.spec/unknown |