-
Notifications
You must be signed in to change notification settings - Fork 35
Graphql #2186
Conversation
3f401e0
to
a30c51f
Compare
358d07b
to
c080ea7
Compare
Signed-off-by: Joe Grund <jgrund@whamcloud.io>
This patch adds two new endpoints:
|
|
||
#[juniper::graphql_object(Context = Context)] | ||
impl QueryRoot { | ||
#[graphql(arguments( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This effectively gives a default it looks like. Seems like a good solution to having to explicitly specify a limit/direction on every call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just docs for the query browser. The default is due to the unwrap_or
calls within this fn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 8 of 8 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @jgrund and @johnsonw)
chroma-manager.conf.template, line 226 at r1 (raw file):
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass {{IML_API_PROXY_PASS}}/graphiql; }
Why no compression here?
iml-api/src/graphql.rs, line 62 at r1 (raw file):
Previously, jgrund (Joe Grund) wrote…
This is just docs for the query browser. The default is due to the
unwrap_or
calls within this fn.
In theory, could we just accept same JSON with limit, offset and direction and not use GraphQL here? Just trying to understand what does GraphQL bring in specifically.
chroma-manager.conf.template, line 226 at r1 (raw file): Previously, mkpankov (Michael Pankov) wrote…
I'll add in a follow-on |
iml-api/src/graphql.rs, line 62 at r1 (raw file): Previously, mkpankov (Michael Pankov) wrote…
Yes, we could do the same with query string params. currently, the biggest draws are:
Of all of those, the ability to generate extensive documentation (which we will need to stay on top of) is the most important imo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @johnsonw)
iml-api/src/graphql.rs, line 62 at r1 (raw file):
Previously, jgrund (Joe Grund) wrote…
Yes, we could do the same with query string params.
currently, the biggest draws are:
- API Documentation generated from code (which is very important for external consumers)
- A query explorer
- A consistently enforced way to structure endpoints
- The ability to request just the data that is needed from clients
Of all of those, the ability to generate extensive documentation (which we will need to stay on top of) is the most important imo.
Done.
Implement Experimental GraphQL support
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)