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

Lint rule unsupported date filter #10

Merged
merged 6 commits into from
May 29, 2024

Conversation

haifeng-li-at-salesforce
Copy link
Contributor

W-15792664
per Feature Limitations of Offline Graphql, graphql local eval doesn't support fiscal date related query.

These 6 fiscal date related literal are not supported

THIS_FISCAL_YEAR,
LAST_FISCAL_YEAR,
NEXT_FISCAL_YEAR
THIS_FISCAL_QUATER,
LAST_FISAL_QUATER,
NEXT_FISCAL_QUATER
These 6 fiscal date range are not supported

last_n_fiscal_quarters
next_n_fiscal_quarters
last_n_fiscal_years
next_n_fiscal_years
n_fiscal_quarter_ago
n_fiscal_years_ago

The rule detects and reports warning if above date filter shows up in graphql query.

image
image

export const NO_FISCAL_DATE_FILTER_SUPPORTED_RULE_ID =
'offline-graphql-no-fiscal-date-filter-supported';

type NodeWithParent = {
Copy link
Contributor

Choose a reason for hiding this comment

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

we can remove this late in the 3 hard limit rules pr once types.ts in pulled in.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or the other way around? Do you really need to use the whole type.ts or can you make define your own type?

Copy link
Contributor

@ben-zhang-at-salesforce ben-zhang-at-salesforce left a comment

Choose a reason for hiding this comment

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

huddled and looks good for me now

Copy link
Contributor

@sfdctaka sfdctaka left a comment

Choose a reason for hiding this comment

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

LGTM!

@haifeng-li-at-salesforce haifeng-li-at-salesforce force-pushed the lintRuleUnsupportedDateFilter branch from 283120e to 298de32 Compare May 29, 2024 17:46
Copy link
Contributor

@ben-zhang-at-salesforce ben-zhang-at-salesforce left a comment

Choose a reason for hiding this comment

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

look very nice

@haifeng-li-at-salesforce haifeng-li-at-salesforce merged commit ea70350 into main May 29, 2024
17 checks passed
@haifeng-li-at-salesforce haifeng-li-at-salesforce deleted the lintRuleUnsupportedDateFilter branch May 29, 2024 17:49
Copy link

github-actions bot commented Jun 4, 2024

🎉 This PR is included in version 1.0.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Jun 4, 2024

🎉 This PR is included in version 1.0.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@salesforce salesforce deleted a comment from github-actions bot Jun 10, 2024
@salesforce salesforce deleted a comment from github-actions bot Jun 10, 2024
@salesforce salesforce deleted a comment from github-actions bot Jun 10, 2024
@salesforce salesforce deleted a comment from github-actions bot Jun 10, 2024
@salesforce salesforce deleted a comment from github-actions bot Jun 18, 2024
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.

3 participants