Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Scarr committed Aug 23, 2018
1 parent 07ee49f commit 12efa2d
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 8 deletions.
39 changes: 36 additions & 3 deletions integration/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions integration/integration-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import {ApolloClient} from "apollo-client";
import fetch from "node-fetch";
import gql from 'graphql-tag';

if (!process.env.SERVER_URL) {
throw "SERVER_URL must be set"
}
var uri = process.env.SERVER_URL || 'http://localhost:8080/query';

const client = new ApolloClient({
link: new HttpLink({uri: process.env.SERVER_URL, fetch: fetch}),
link: new HttpLink({uri, fetch}),
cache: new InMemoryCache(),
defaultOptions: {
watchQuery: {
Expand Down
5 changes: 4 additions & 1 deletion integration/schema-expected.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# source: http://localhost:8080/query
# timestamp: Fri Aug 10 2018 11:50:28 GMT+1000 (AEST)
# timestamp: Thu Aug 23 2018 10:30:37 GMT+1000 (AEST)

"""This directive does magical things"""
directive @magic(kind: Int) on FIELD_DEFINITION

enum DATE_FILTER_OP {
EQ
Expand Down
3 changes: 3 additions & 0 deletions integration/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"This directive does magical things"
directive @magic(kind: Int) on FIELD_DEFINITION

type Element {
child: Element!
error: Boolean!
Expand Down

0 comments on commit 12efa2d

Please sign in to comment.