-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: small tweaks filter out Upload from the generated scalars as that's apollo built-in one do not use the 'latest' version of chimp when initializing or creating a chimp tooling * test: e2e script updated
- Loading branch information
Showing
8 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
/tmp | ||
node_modules | ||
.idea | ||
.eslintcache |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import gql from 'graphql-tag'; | ||
|
||
export default (graphqlString: string) => { | ||
export default (graphqlString: string): string[] => { | ||
const graphqlAST = gql` | ||
${graphqlString} | ||
`; | ||
|
||
// @ts-ignore | ||
return graphqlAST.definitions.filter((d) => d.kind === 'ScalarTypeDefinition').map((f) => f.name.value); | ||
return ( | ||
graphqlAST.definitions | ||
.filter((d) => d.kind === 'ScalarTypeDefinition') | ||
// @ts-ignore | ||
.map((f) => f.name.value) | ||
.filter((s) => s !== 'Upload') | ||
); | ||
}; |
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,9 @@ | ||
// @ts-ignore | ||
import finder from 'find-package-json'; | ||
|
||
export const getChimpVersion = () => { | ||
const f = finder(__dirname); | ||
const packageJson = f.next(); | ||
|
||
return packageJson.value.version; | ||
}; |
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