-
Notifications
You must be signed in to change notification settings - Fork 51
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
Queries and routes for Projects via GraphQL #130
base: master
Are you sure you want to change the base?
Conversation
OK, I've started updating the branch code https://github.com/radekstepan/burnchart/compare/danvk-graphql-projects and there's too much duplication going on. I will first refactor the code to handle issues regardless of whether they are attached to a milestone or a project so that's easier to add the GraphQL queries. |
Great! Let me know if there's anything I can do to help. |
Hey @danvk so I've tried to modernize the codebase to modern React/Redux and it was a massive undertaking. So... to get your code working, I just ripped out the old request logic and created a branch where all repos render their project/s and not milestone/s. I've tested with Here's the branch: danvk-graphql-projects...projects Would you be able to take it from here? |
Nice @radekstepan, I can see burndown charts for my repo-based projects using your branch. So what you're asking from me is to add back support for repos? |
In particular, would you want to switch entirely to the GraphQL API for milestones, too? |
Suggestion for what the routes should be:
|
Hi @danvk I am glad it works for you! I like the URL structure and think we should use GraphQL for milestones too. Yes, it means needing to authenticate every time, but due to rate limiting I think any serious user would need to login anyway. To use
But, I need to do some work on In the meantime, if you have time, I'd appreciate any help on the Thanks! |
Sounds good. You can fetch two types of data in a single GraphQL call, so that milestones + projects should work well. I've noticed that whenever I reload a page in the local dev setup, I have to log in to GitHub again. Is this something you've run into? Do you have a workaround? It would make iterating on the GraphQL features much faster. |
That's perfect, I like having just one query to fetch both. Yep... it's an issue I am aware of. The older version of Firebase would return a GitHub auth token in the response that the client could reuse on app reload/refresh, then they changed it to no longer allow that. I need to look into removing Firebase as a dependency and getting (and reusing) the token some other way. |
Hi @radekstepan, here's the work you requested in #129 (comment).
A couple things to note:
I added routes but they're more of a suggestion. I've verified that one of the queries in
requests.js
worked in the browser and verified all the GraphQL queries in the GraphQL API Explorer.Let me know if this is enough for you to take over.