-
Notifications
You must be signed in to change notification settings - Fork 344
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
Library page #1569
Library page #1569
Conversation
…brary-page merge conflict
@patricoferris please I can't get the test to pass. Please can you assist with a solution.. |
Hi @dinakajoy thanks for the PR. You have added the One thought though, we already transitively (i.e. one of our dependencies depends on) a JSON parsing library called Ezjsonm, do you think you could refactor to use that? It means we keep our dependency footprint a little smaller and you don't have to add anything to the opam file because of this transitive dependency (we probably still will add it but that's more for future-proofing as we already have it)? |
I will check it out. Thank you for the update |
Have a look at ocaml/ocaml.org#1528 (comment) where I recommended that same. It should already be installed by COW. It's not a bad idea to add it into the opam file anyway to make dependency explicit, but it doesn't change much as we were pulling it in anyway. The only reason to add it as well is in case COW decides to not use it anymore. |
@patricoferris I have changed from yojson to ezjsonm and the test passes now. Thank you. |
@dinakajoy thanks for converting over to Ezjsonm, great work! To use GraphQL this example which I showed someone else but can't remember who should be quite instructive. I'm pretty sure all GraphQL clients do this at some point, |
This is a great start but would I be able to pass arguments for the query? |
Yes for example https://github.com/coq/bot/blob/master/bot-components/GraphQL_query.ml#L15 you just pass it as part of the JSON argument with the key "variables" |
Thank you so much. Let me try this out. |
Hi @patricoferris I have been able to get the queries to run. { "data": { "repository": { "name": "merlin", "description": "Context sensitive completion for OCaml in Vim and Emacs", "url": "https://github.com/ocaml/merlin", "stargazerCount": 1306, "forkCount": 180, "updatedAt": "2021-05-05T02:09:45Z", "issues": { "totalCount": 887 }, "pullRequests": { "nodes": [ { "title": "Attempt to fix #1199", "url": "https://github.com/ocaml/merlin/pull/1329", "state": "MERGED", "updatedAt": "2021-04-27T16:56:30Z", "author": { "login": "rgrinberg" } }, { "title": "Fix #1228", "url": "https://github.com/ocaml/merlin/pull/1331", "state": "OPEN", "updatedAt": "2021-05-04T16:39:14Z", "author": { "login": "rgrinberg" } }, { "title": "[construct] Module holes", "url": "https://github.com/ocaml/merlin/pull/1333", "state": "OPEN", "updatedAt": "2021-04-30T15:02:16Z", "author": { "login": "voodoos" } }, { "title": "Don't repeat environment entries in Typemod.check_type_decl (ocaml/ocaml#10382)", "url": "https://github.com/ocaml/merlin/pull/1334", "state": "OPEN", "updatedAt": "2021-04-29T15:59:09Z", "author": { "login": "voodoos" } }, { "title": "Reproduce issue #1335", "url": "https://github.com/ocaml/merlin/pull/1336", "state": "OPEN", "updatedAt": "2021-04-30T18:39:27Z", "author": { "login": "rgrinberg" } } ] } } } } Please how do I access these data? |
Hi :)) You've said
But you haven't showed me the code that is throwing the error or what error it is which makes it quite difficult to help. It's always useful to provide too much information when you encounter an error and ask for help. That being said, I open utop # let v = Ezjsonm.from_string s;;
utop # Ezjsonm.find v [ "data"; "repository"; "name" ];;
- : Ezjsonm.value = `String "merlin" So it all seems to be working, am I missing something? |
@patricoferris @pitag-ha @kanishka-work Can I make a pull request with this? |
Hi @patricoferris and @pitag-ha, please I am still expecting feedback on this. |
Hi @dinakajoy, awesome work, feel free to make a PR if you wish :)) |
Issue Description
Make it possible to get quick glimpse of what PRs are being actively worked on for various ocaml libraries.
The library page is responsive to any device width.
Starts #1483
What has been achieved so far
Details of specified github repos will be displayed on the /libraries page
What is yet to be achieved
Details of the PRs of individual libraries
Catching errors on HTTP request
Format date to display in this format - Last updated 2 days ago
Add a link to the Libraries page