forked from join-monster/join-monster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 319-sqlBatch-w-single-field
- Loading branch information
Showing
23 changed files
with
140 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
linters: | ||
shellcheck: | ||
shell: bash | ||
eslint: | ||
config: './.eslintrc.js' | ||
|
||
files: | ||
ignore: | ||
- 'node_modules/*' | ||
- 'test-api/*' | ||
- 'docs/*' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ language: node_js | |
dist: precise | ||
node_js: | ||
- 6 | ||
- 7 | ||
- 8 | ||
- 10 | ||
|
||
deploy: | ||
- provider: npm | ||
skip_cleanup: true | ||
email: [email protected] | ||
email: [email protected] | ||
# only tagged commits will trigger deploy. all other commits simply run the lint and tests | ||
on: | ||
tags: true | ||
|
@@ -31,7 +31,6 @@ before_script: | |
# create the databases | ||
- psql -c "CREATE DATABASE test1 LC_COLLATE 'en_US.UTF-8';" -U postgres | ||
- psql -c "CREATE DATABASE test2 LC_COLLATE 'en_US.UTF-8';" -U postgres | ||
- psql -c "CREATE DATABASE test3 LC_COLLATE 'en_US.UTF-8';" -U postgres | ||
- psql -c "CREATE DATABASE demo LC_COLLATE 'en_US.UTF-8';" -U postgres | ||
- echo "CREATE DATABASE test1" | mysql -u travis | ||
- echo "CREATE DATABASE test2" | mysql -u travis | ||
|
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 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 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 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 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 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 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 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 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 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 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 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 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
Binary file not shown.
Binary file not shown.
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { | ||
GraphQLObjectType, | ||
GraphQLString, | ||
GraphQLInt | ||
} from 'graphql' | ||
import { | ||
globalIdField, | ||
} from 'graphql-relay' | ||
import { nodeInterface } from './Node' | ||
import { q } from '../shared' | ||
|
||
const { DB } = process.env | ||
|
||
const ContextPost = new GraphQLObjectType({ | ||
description: 'A post from a user. This object is used in a context test and must be given a context.table to resolve.', | ||
name: 'ContextPost', | ||
interfaces: () => [nodeInterface], | ||
sqlTable: (_, context) => `(SELECT * FROM ${q(context.table, DB)})`, | ||
uniqueKey: 'id', | ||
fields: () => ({ | ||
id: { | ||
...globalIdField(), | ||
sqlDeps: ['id'] | ||
}, | ||
body: { | ||
description: 'The content of the post', | ||
type: GraphQLString | ||
}, | ||
}) | ||
}) | ||
|
||
export default ContextPost |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,3 @@ const { nodeInterface, nodeField } = nodeDefinitions( | |
) | ||
|
||
export { nodeInterface, nodeField } | ||
|
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 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