Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add graphql support #65

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: add graphql support #65

wants to merge 2 commits into from

Conversation

ashwinkjoseph
Copy link

  1. Adds graphql libraries

  2. Adds commands in package.json to automatically fetch the latest schema from the server and generate typescript types from it everytime yarn start is executed. NOTE: for this to work, all queries must be written in their own query file in src/gql with the extension .gql.ts. All types will be generated in src/gql/types

  3. Adds an example query which is used in the program list component. This destroys existing code and functionality as I couldn't find an easier approach to demo it. I will fix it later or you can just use this commit as reference and not merge it in

1. Adds graphql libraries

2. Adds commands in package.json to automatically fetch the latest schema from the server and generate typescript types from it everytime yarn start is executed. NOTE: for this to work, all queries must be written in their own query file in src/gql with the extension .gql.ts. All types will be generated in src/gql/types

3. Adds an example query which is used in the program list component. This destroys existing code and functionality as I couldn't find an easier approach to demo it. I will fix it later or you can just use this commit as reference and not merge it in
@ashwinkjoseph
Copy link
Author

You'd need to have apollo cli installed globally on your machine to use this.
I am trying to find a work around for that too, but installing it as a dev dependency will install an older version of graphql along with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant