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
Adds ability to apply facets in GraphQL #350
Conversation
A separate commit will follow with tests but I wanted to get some feedback as-is. |
There is inconsistent naming for |
8508afd
to
1c4323f
Compare
I'm trying to apply facets and better understand how this is supposed to work, and I think I'm misunderstanding something. If I understand this feature correctly, a query like this would return only nonfiction records? When I try it in the playground, though, I'm seeing results that are both nonfiction and fiction. I see similar behavior when trying to facet on languages.
|
@matt-bernhardt I'm seeing the same behavior. I swear this worked at some point ;). I'll try to figure out what broke between then and now and update. Thanks. |
@matt-bernhardt the last commit broke the functionality. I think I didn't update the test cassettes so didn't notice it. Ooops. I'll fix it... possibly by removing the last commit that broke it and open some tickets to review the CodeClimate concerns if I don't find a quick fix for why it broke. |
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.
Sorry, forgot to sign off on this yesterday afternoon. Following the latest commit, faceting works for me on a few test queries (languages, format, literary form, subjects), and the tests pass.
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 looks good to me as well. I agree with resolving the conflict between format
and contentFormat
when we get a chance.
Our initial GraphQL implementation was intended as experiemental so it did not incldue the ability to apply facets. As we start to consider whether we will move to GraphQL fully or stay with REST, it seemed worthwhile to consider how working with facets would feel in GraphQL both in terms of consuming the data and writing the code. https://mitlibraries.atlassian.net/browse/DISCO-60
aebea36
to
031c31a
Compare
Our initial GraphQL implementation was intended as experiemental so it did not incldue the ability to apply facets.
As we start to consider whether we will move to GraphQL fully or stay with REST, it seemed worthwhile to consider how working with facets would feel in GraphQL both in terms of consuming the data and writing the code.
https://mitlibraries.atlassian.net/browse/DISCO-60
How can a reviewer manually see the effects of these changes?
Using the GraphQL Playground in this PR, you should note the Docs have been updated to reflect the new ability to optionally apply facets. Some facets, such as Subject allow an array of Strings and others just allow Strings.
An example starting point might be:
What are the relevant tickets?
Requires Database Migrations?
NO
Includes new or updated dependencies?
NO