-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby): Add aggregation resolvers #30789
Conversation
c81b74c
to
a657a23
Compare
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.
Looks good to me!
@@ -1646,7 +1764,7 @@ describe(`Query schema`, () => { | |||
/** | |||
* queries are read from file and parsed with babel | |||
*/ | |||
it.only(`escape sequences work when correctly escaped`, async () => { |
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.
😬 Good catch!
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.
I'm happy to say the other tests were all passing when I removed that!
This is great! |
integration-tests/gatsby-source-wordpress/__tests__/__snapshots__/index.js.snap
Outdated
Show resolved
Hide resolved
* master: (183 commits) chore(gatsby-plugin-image): Remove version note (#30758) docs: retire 'How to Create Pages' stub and Recipes landing page (#30842) chore(docs): Fix typo (#30858) docs: fix invalid mailto links in 3.3 release notes (#30862) docs: release notes for 3.3 (#30837) fix(gatsby-source-wordpress): invalidate less queries during previews (#30770) fix(gatsby-starter-wordpress-blog): Fix altText (#30832) feat(contentful): warn users when using restricted content type names (#30715) Refactor: using-contentful to use gatsby-plugin-image exclusively (#30717) chore(gatsby-plugin-styled-components): Remove breaking changes section (#30806) fix(gatsby): webpack warnings are no longer in object format by default (#30801) fix(gatsby): Decode base path in runtime (#30682) fix(gatsby): "Cannot find module 'babel-preset-gatsby'" error (#30813) handle plugin parentDir resolution in resolvePlugin() (#30812) Port using-gatsby-image site to image plugin (#28489) fix(gatsby-source-contentful): De-dupe type names (#30834) feat(gatsby): Add aggregation resolvers (#30789) fix(gatsby-core-utils): fetch-remote-file download failure when missing content-length header (#30810) fix(renovate): add breaking minor updates to major updates list (#30676) chore(docs): Update migration guide for plugins that support both v2 & v3 (#30825) ...
Wanted to say thank you for this! It's a huge help! |
I did want to ask though if it were possible to add a “count” aggregation function? I don’t mind submitting a pull request. Edit: Whoops, there is already a totalCount resolver. |
* feat(gatsby): Add aggregation resolvers * Update snapshots * Update snapshot * Update integration-tests/gatsby-source-wordpress/__tests__/__snapshots__/index.js.snap * Update snap
Adds
min()
,max()
andsum()
resolvers toallXXX
queries, similar to the currentgroup
anddistinct
.Usage:
It supports numeric fields, but also attempts to cast non-numeric fields, and includes them if the value is not
NaN
.