Skip to content

Commit 881e05d

Browse files
authored
Merge pull request #23 from clivewong/main
UI Text for mobile ESLint plugin GraphQL warnings
2 parents 3ad7ea4 + 9cc3014 commit 881e05d

10 files changed

+20
-16
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
test-report.xml
55
junit.xml
66
tsconfig.tsbuildinfo
7+
.DS_Store

Diff for: src/rules/apex/apex-import.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ export const rule = ESLintUtils.RuleCreator.withoutDocs({
2424
meta: {
2525
docs: {
2626
description:
27-
'Using Apex in LWC Offline-enabled mobile apps requires additional considerations to ensure proper functioning in offline scenarios. See https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/apex.htm for more details.'
27+
'Using Apex in LWC Offline-enabled mobile apps requires additional considerations to ensure proper functioning in offline scenarios. See Use Apex While Mobile and Offline (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/apex.htm) for more details.'
2828
},
2929
messages: {
3030
[APEX_IMPORT_RULE_ID]:
31-
'Using Apex in LWC Offline-enabled mobile apps requires careful consideration.'
31+
'Using Apex in LWC Offline-enabled mobile apps requires careful consideration in offline scenarios.'
3232
},
3333
type: 'suggestion',
3434
schema: []

Diff for: src/rules/graphql/no-aggregate-query-supported.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const rule: GraphQLESLintRule = {
1717
docs: {
1818
category: 'Operations',
1919
description:
20-
'Aggregate operations in a GraphQL query are not supported for Offline GraphQL.',
20+
'Aggregate operations in a GraphQL query are not supported for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.',
2121
examples: [
2222
{
2323
title: 'Incorrect',
@@ -48,7 +48,7 @@ export const rule: GraphQLESLintRule = {
4848
},
4949
messages: {
5050
[NO_AGGREGATE_QUERY_SUPPORTED_RULE_ID]:
51-
'Offline GraphQL: Aggregate operations in a query are not supported for mobile offline'
51+
'Offline GraphQL: Aggregate operations in a query are not supported for mobile offline.'
5252
},
5353
schema: []
5454
},

Diff for: src/rules/graphql/no-fiscal-date-filtering-supported.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export const rule: GraphQLESLintRule = {
1616
meta: {
1717
type: 'problem',
1818
docs: {
19-
description: 'Fiscal date literals and ranges are not supported in Offline GraphQL',
19+
description:
20+
'Fiscal date literals and ranges are not supported in filters for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.',
2021
category: 'Operations',
2122
recommended: true,
2223
examples: [
@@ -94,7 +95,7 @@ export const rule: GraphQLESLintRule = {
9495
},
9596
messages: {
9697
[NO_FISCAL_DATE_FILTER_SUPPORTED_RULE_ID]:
97-
'Offline GraphQL: Date {{filterType}} "{{filterName}}" is not supported offline.'
98+
'Offline GraphQL: Date {{filterType}} "{{filterName}}" is not supported for mobile offline.'
9899
},
99100
schema: []
100101
},

Diff for: src/rules/graphql/no-more-than-1-parent-record.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const rule: GraphQLESLintRule = {
1616
hasSuggestions: false,
1717
docs: {
1818
category: 'Operations',
19-
description: `Offline GraphQL: You should only query one parent entity, for queries fetching child entities. Set the parent's 'first' argument value to 1.`,
19+
description: `Queries fetching child entities can only fetch 1 parent record. Set the parent's 'first' argument value to 1.`,
2020
examples: [
2121
{
2222
title: 'Correct',
@@ -90,7 +90,7 @@ export const rule: GraphQLESLintRule = {
9090
]
9191
},
9292
messages: {
93-
[NO_MORE_THAN_1_PARENT_RECORD_RULE_ID]: `Offline GraphQL: Queries fetching child entities should only fetch 1 parent record. Currently it's "{{pageSize}}".`
93+
[NO_MORE_THAN_1_PARENT_RECORD_RULE_ID]: `Offline GraphQL: Queries fetching child entities can only fetch 1 parent record. Currently it's "{{pageSize}}".`
9494
},
9595
schema: []
9696
},

Diff for: src/rules/graphql/no-more-than-3-child-entities.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const rule: GraphQLESLintRule = {
1616
hasSuggestions: false,
1717
docs: {
1818
category: 'Operations',
19-
description: `Offline GraphQL: Do not fetch more than 3 child entities.`,
19+
description: `Do not fetch more than 3 child entities.`,
2020
examples: [
2121
{
2222
title: 'Correct',
@@ -102,7 +102,7 @@ export const rule: GraphQLESLintRule = {
102102
]
103103
},
104104
messages: {
105-
[NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID]: `Offline GraphQL: fetch no more than 3 child entities.`
105+
[NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID]: `Offline GraphQL: Do not fetch more than 3 child entities.`
106106
},
107107
schema: []
108108
},

Diff for: src/rules/graphql/no-more-than-3-root-entities.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const rule: GraphQLESLintRule = {
133133
]
134134
},
135135
messages: {
136-
[NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID]: `Offline GraphQL: fetch no more than 3 root entities.`
136+
[NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID]: `Offline GraphQL: Do not fetch more than 3 root entities.`
137137
},
138138
schema: []
139139
},

Diff for: src/rules/graphql/no-mutation-supported.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export const rule: GraphQLESLintRule = {
1717
hasSuggestions: false,
1818
docs: {
1919
category: 'Operations',
20-
description: 'Mutation (data modification) is not supported for mobile offline',
20+
description:
21+
'Mutation (data modification) is not supported for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.',
2122
recommended: true,
2223
examples: [
2324
{
@@ -62,7 +63,7 @@ export const rule: GraphQLESLintRule = {
6263
},
6364
messages: {
6465
[NO_MUTATION_SUPPORTED_RULE_ID]:
65-
'Offline GraphQL: Mutation (data modification) is not supported offline.'
66+
'Offline GraphQL: Mutation (data modification) is not supported for mobile offline.'
6667
},
6768
schema: []
6869
},

Diff for: src/rules/graphql/no-semi-anti-join-supported.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export const rule: GraphQLESLintRule = {
1414
type: 'problem',
1515
hasSuggestions: false,
1616
docs: {
17-
description: 'Semi-join and anti-join filters are not supported for mobile offline',
17+
description:
18+
'Semi-join and anti-join filters are not supported for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.',
1819
category: 'Operations',
1920
recommended: true,
2021
examples: [

Diff for: src/rules/graphql/unsupported-scope.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const rule: GraphQLESLintRule = {
2525
type: 'problem',
2626
docs: {
2727
category: 'Operations',
28-
description: `Offline GraphQL supports the scope "MINE" for all entities, and "ASSIGNEDTOME" for ServiceAppointment. All other scopes (for example TEAM, QUEUE_OWNED and USER_OWNED) are not supported.`,
28+
description: `Offline GraphQL supports the scope "MINE" for all entities, and "ASSIGNEDTOME" for ServiceAppointment. All other scopes (for example TEAM, QUEUE_OWNED and USER_OWNED) are not supported for mobile offline. See Feature Limitations of Offline GraphQL (https://developer.salesforce.com/docs/atlas.en-us.mobile_offline.meta/mobile_offline/use_graphql_limitations.htm) for more details.`,
2929
recommended: true,
3030
examples: [
3131
{
@@ -68,7 +68,7 @@ export const rule: GraphQLESLintRule = {
6868
},
6969
messages: {
7070
[SCOPE_SUPPORTED_FOR_CERTAIN_ENTITIES_ONLY]:
71-
'Offline GraphQL: Scope "{{scopeName}}" is only supported for the "{{supportedEntities}}" entity for mobile offline use cases',
71+
'Offline GraphQL: Scope "{{scopeName}}" is only supported for the "{{supportedEntities}}" entity for mobile offline use cases.',
7272
[OTHER_UNSUPPORTED_SCOPE]:
7373
'Offline GraphQL: Scope "{{scopeName}}" is unsupported for mobile offline use cases.'
7474
},

0 commit comments

Comments
 (0)