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

@broskoski => Schema for followed artists filter #348

Merged

Conversation

mzikherman
Copy link
Contributor

Needed for Comm filtering 1.6 (artworks by followed artists filter)

@mzikherman
Copy link
Contributor Author

Gravity PR's: https://github.com/artsy/gravity/pull/10200 (filtering by artists you follow), and https://github.com/artsy/gravity/pull/10203 (return counts for followed artists in aggregations)

@broskoski
Copy link
Contributor

Looks good but ❌

@mzikherman
Copy link
Contributor Author

💚

followed_artists_total: {
type: GraphQLInt,
resolve: ({ aggregations }) => aggregations.followed_artists.value,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t these counts go in a counts object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the current total we just expose in the schema, so this just follows that pattern.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I get that, but I guess that makes sense when there’s only 1 count field. I’m more wondering in general when the best time would be to add a counts object. Should we do that even if there’s only 1 count field so that it’s clear where subsequent count fields need to go and we don’t need to move API around?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, not sure the best practices around counts field, I haven't used them yet.

I'm happy to do whatever, since there is already deployed code that depends on the current schema (as well as a pending Force PR: artsy/force#5344, mind making that an issue that I can tackle later?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, in general I think we want to stick to the counts convention that Master @dzucconi set up, so its always one way. Feel free to follow up in a future PR if it's more complicated to change now though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, yea let's do it in a subsequent PR, esp since the Force one is merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this one is merged. Cool! 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mzikherman Filed a ticket #350

@mzikherman
Copy link
Contributor Author

Bump.

@mzikherman mzikherman force-pushed the commercial_filtering_followed_artists branch from a93b450 to fabff66 Compare July 12, 2016 15:32
@broskoski broskoski merged commit ff83277 into artsy:master Jul 12, 2016
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.

None yet

3 participants