Commit 22e2097
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>1 parent 384b7df commit 22e2097
24 files changed
Lines changed: 922 additions & 395 deletions
File tree
- Apollo.xcodeproj
- Sources
- ApolloCodegenLib
- Frontend
- JavaScript
- src
- dist
- ApolloCodegenTestSupport
- SwiftScripts/Sources/SchemaDownload
- Tests
- ApolloCodegenTests
- Resources
- ApolloPerformanceTests/Responses
- ApolloServerIntegrationTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
64 | | - | |
| 66 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
Lines changed: 97 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
0 commit comments