Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dependency on apollo CLI for fetching schema (#1935)
* Pull downloader into its own file * Use URL downloader in CLI downloader * Update headers to take both key and value * Add Apollo-Use-Only method to create a non-type safe GraphQL request * Add methods for direct download from registry and introspection rather than using the JS CLI * Revert "Add Apollo-Use-Only method to create a non-type safe GraphQL request" This reverts commit 9aac6367a611260ffea12e3b0ae965b999d9b9d3. * Pull untyped request body creator into codegen lib * update types on codegen tests * Pull out usage of the typescript CLI 🎉 * Make sure URL request headers are properly set * don't try to import all of apollo 🤦♀️ * Make sure keys are sorted * Make sure folder is created before trying to write to it * Update tests * Update that we should really only be getting SDL files, not JSON, because the JSON is so damned huge * start adding and testing downloading the schema from the graph registry * Turns out variant is actually required * fix expected file name * get rid of arguments parameter, update custom debug strings * Turns out you have to _throw_ the error rather than just creating it 🤦♀️ * Check that downloaded info from introspection query can be loaded into an actual schema rather than just being json * test that downloaded SDL schema from the Registry can be turned into a schema * Clarify where we're converting from a downloaded Registry file vs a downloaded Introspection file. * first swipe at adding SDL printing for introspection * Updated JS bundle * add tslib to the package.json so it gets pulled in if you haven't globally installed it * actual, successful swipe at getting introspection JSON converted to SDL. * Update integration tests for new schema downloader * Organize code by section * Fix spelling mistake * Clean-up CLIDownloader API and tests * Clean-up URLDownloader and add tests * Ignore URLDownloader test output * Fix library import for ApolloPerformanceTests * Improve test feedback when not setting a request handler * Remove comment about public use of UntypedGraphQLRequestBodyCreator * Improve test names and operation * Refactored ApolloSchemaDownloadConfiguration * Refactor ApolloSchemaDownloader * Update schema download script for changed API * Remove irrelevant schema download integration test * Move linked library from ApolloPerformanceTest target to ApolloTestSupport target * Move MockNetworkSession to ApolloCodegenTestSupport target * Add SDL validation to StarWarsApolloSchemaDownloaderTests * Add registry-based ApolloSchemaDownloader integration test * Finish unit tests for ApolloSchemaDownloader * Add Apollo prefix to 'registry' usage in schema downloader * Add documentation to ApolloSchemaDownloadConfiguration * Fix ApolloServerIntegrationTests for enum value renaming Co-authored-by: Ellen Shapiro <designatednerd@gmail.com>
- Loading branch information