Open
Conversation
packages/util/package.json
Outdated
| "graphql": "^0.10.1", | ||
| "graphql-tag": "^2.2.2", | ||
| "graphql-tools": "^1.0.0", | ||
| "merge-graphql-schemas": "0.0.17" |
Contributor
There was a problem hiding this comment.
it looks like the only new ones should be glob and merge-graphql-schemas, right?
can we remove the others?
Contributor
Author
There was a problem hiding this comment.
some of those were merge-graphql-schemas peer dependencies, will see how to get rid of them.
packages/cli/src/index.ts
Outdated
| } else if (fileName) { | ||
| const schema: string = readFile(fileName); | ||
| let schema: string = ''; | ||
| if (fileName.includes('*') && fileName.includes('.gql')) { |
Contributor
There was a problem hiding this comment.
we might want to support .graphql as well
maybe something like:
['gql', 'graphql'].some(ext => fileName.endsWith(ext))
Contributor
Author
There was a problem hiding this comment.
cool, will make that change
packages/cli/src/index.ts
Outdated
| if (fileName.includes('*') && fileName.includes('.gql')) { | ||
| schema = gqlGlobHandler(fileName); | ||
| } | ||
| schema = readFile(fileName); |
Contributor
There was a problem hiding this comment.
should this be in an else condition?
packages/cli/src/index.ts
Outdated
| process.stdin.on('end', () => run(JSON.parse(input), program as any)); | ||
| } else if (fileName) { | ||
| const schema: string = readFile(fileName); | ||
| let schema: string = ''; |
Contributor
There was a problem hiding this comment.
perhaps we should throw all of this into a function in util - or maybe add the functionality to readFile?
test/data/products.gql
Outdated
| } | ||
| type Query { | ||
| products: [Product] | ||
| } No newline at end of file |
Contributor
There was a problem hiding this comment.
nit: can you add a new line character?
|
👀 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR for #75 I introduced quite a couple of new dependencies which may not be ideal. Anyhow Its just an early attempt let me know what you think and I will make the required changes.