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 offline supported scope #8

Merged
merged 10 commits into from
May 23, 2024

Conversation

haifeng-li-at-salesforce
Copy link
Collaborator

@haifeng-li-at-salesforce haifeng-li-at-salesforce commented May 20, 2024

W-15792451
per Feature Limitations of Offline Graphql, graphql local eval doesn't support TEAM, QUEUEOWNED, USEROWNED, EVERYTHING yet, ASSIGNEDTOME is not supported except for ServiceAppointment. so need eslint rule to warn lwc developer if the crafted graphql statement has such scope filter.

image image

@sfdctaka sfdctaka force-pushed the lintRuleOfflineSupportedScope branch from cbac675 to 5536e9a Compare May 23, 2024 17:53
Copy link
Collaborator

@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.

looks good to me

type: 'problem',
docs: {
category: 'Operations',
description: `For mobile offline use cases, scope "MINE" is supported and scope "ASSIGNEDTOME" is only supported for ServiceAppointment . All other scopes like TEAM, QUEUE_OWNED and USER_OWNED are not supported `,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description: `For mobile offline use cases, scope "MINE" is supported and scope "ASSIGNEDTOME" is only supported for ServiceAppointment . All other scopes like TEAM, QUEUE_OWNED and USER_OWNED are not supported `,
description: `For mobile offline use cases, scope "MINE" is supported and scope "ASSIGNEDTOME" is only supported for ServiceAppointment. All other scopes like TEAM, QUEUE_OWNED and USER_OWNED are not supported.`,

},
messages: {
[SCOPE_SUPPORTED_FOR_CERTAIN_ENTITIES_ONLY]:
'Offline GraphQL: Scope "{{scopeName}}" is only supported for the "{{supportedEntities}}" entity, for mobile offline use cases',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
'Offline GraphQL: Scope "{{scopeName}}" is only supported for the "{{supportedEntities}}" entity, for mobile offline use cases',
'Offline GraphQL: Scope "{{scopeName}}" is only supported for the "{{supportedEntities}}" entity, for mobile offline use cases.',

Copy link
Collaborator

@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.

Couple nits but otherwise LGTM!

@haifeng-li-at-salesforce haifeng-li-at-salesforce merged commit 843a9e0 into main May 23, 2024
17 checks passed
@haifeng-li-at-salesforce haifeng-li-at-salesforce deleted the lintRuleOfflineSupportedScope branch May 24, 2024 23:43
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 📦🚀

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