Last active
April 4, 2020 01:56
-
-
Save timbophillips/b430c8241cdd6fe62a683e79b4845a9f to your computer and use it in GitHub Desktop.
codegen angular apollog hasura graphql
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
https://github.com/dotansimha/graphql-code-generator/issues/2043 | |
https://medium.com/angular-in-depth/configuring-a-angular-cli-project-with-graphql-37217f66d419 | |
https://github.com/dotansimha/graphql-code-generator/issues/2043#issuecomment-508540316 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CLI commands:
ng new graphql3 cd graphql3 ng add apollo-angular npm install -s apollo-link-ws subscriptions-transport-ws
Modify
angular.json
to add pointer to proxy config fileadd a new file
src/proxy.conf.json
with proxy settings:modify
src/app/graphql.nodule.ts
to differentiate websocket requests, modify the url, and access via proxy:back to the command line
add / modify package scripts in
package.json
:run the update-schema script:
install GraphQL Codegen CLI
run it:
add an ignore line to
.gitignore
install a npm app that lets us run more than one watch script
create a GraphQL file and put it in the
src/app
foldermodify the
src/app/app.component.ts
file to create a "testing page":command line