Skip to content

Commit

Permalink
Breaking: use a new extension for GraphQL intellisense (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
forabi committed Jun 15, 2018
1 parent a84e62f commit 21b1166
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 34 deletions.
3 changes: 0 additions & 3 deletions clown/common/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
],
"editor.tabSize": 2,
"editor.formatOnSave": true,
"[json]": {
"editor.formatOnSave": false
},
"files.associations": {
"**/.babelrc": "jsonc",
"**/.babelrc.json": "jsonc",
Expand Down
4 changes: 2 additions & 2 deletions clown/graphqlClient/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is automatically generated when running `yarn graphql/schema`
schema.graphql
# This file is automatically generated when running `yarn app/graphql/schema`
graphqlSchema.json
13 changes: 0 additions & 13 deletions clown/graphqlClient/.gqlconfig

This file was deleted.

14 changes: 9 additions & 5 deletions clown/graphqlClient/.graphqlconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"schemaPath": "schema.graphql",
"extensions": {
"endpoints": {
"dev": "https://api.hollowverse.com/graphql",
"prod": "https://api.hollowverse.com/graphql"
"projects": {
"app": {
"schemaPath": "graphqlSchema.json",
"includes": ["src/**/*.graphql"],
"extensions": {
"endpoints": {
"default": "https://api.hollowverse.com/graphql"
}
}
}
}
}
2 changes: 1 addition & 1 deletion clown/graphqlClient/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["mrmlnc.vscode-json5", "kumar-harsh.graphql-for-vscode"]
"recommendations": ["prisma.vscode-graphql"]
}
1 change: 0 additions & 1 deletion clown/graphqlClient/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cSpell.words": ["graphql"],
"files.associations": {
"**/.gqlconfig": "json",
"**/.graphqlconfig": "json"
},
"eslint.validate": ["graphql"]
Expand Down
11 changes: 6 additions & 5 deletions clown/graphqlClient/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"scripts": {
"graphql/schema": "graphql get-schema -e prod -o schema.graphql"
"lint-graphql": "run-s app/graphql/schema && eslint --ext .graphql --ext .gql 'src/**/*.{gql,graphql}'",
"app/graphql/schema": "apollo-codegen introspect-schema ${API_ENDPOINT:-https://api.hollowverse.com/graphql} --output ./graphqlSchema.json"
},
"resolutions": {
"graphql": "^0.13.0"
"graphql": "^0.13.2"
},
"devDependencies": {
"@playlyfe/gql": "^2.6.0",
"apollo-codegen": "^0.19.1",
"graphql": "^0.13.2",
"graphql-cli": "^2.15.11",
"eslint-plugin-graphql": "^2.1.0"
"graphql-cli": "^2.16.3",
"eslint-plugin-graphql": "^2.1.1",
"ts-graphql-plugin": "^1.1.2"
}
}
9 changes: 9 additions & 0 deletions clown/graphqlClient/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"plugins": [
{
"name": "ts-graphql-plugin"
}
]
}
}
12 changes: 8 additions & 4 deletions eslint/graphql/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,29 @@
"error",
{
"env": "literal",
"validators": "all"
"validators": "all",
"projectName": "app"
}
],
"graphql/no-deprecated-fields": [
"error",
{
"env": "literal"
"env": "literal",
"projectName": "app"
}
],
"graphql/capitalized-type-name": [
"error",
{
"env": "literal"
"env": "literal",
"projectName": "app"
}
],
"graphql/named-operations": [
"error",
{
"env": "literal"
"env": "literal",
"projectName": "app"
}
]
}
Expand Down

0 comments on commit 21b1166

Please sign in to comment.