You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build the linked example project and check the obj/berry output.
What is expected?
The generated code and query is different from the one I have in my .graphql file and additional types are added to the query. I would expect only the types I explicitly query would end up being queried in the end.
What is actually happening?
When you look at the generated files in ActivitlyListQuery.Client you will notice in the generated class the following GraphQL query. It is not just a comment, but also what StrawberryShake ends up requesting from the server.
queryActivityList($take: Int, $skip: Int, $activityKinds: [ActivityKind!], $includeHidden: Boolean) {
me {
__typenameactivities(take: $take, skip: $skip, kinds: $activityKinds, includeHidden: $includeHidden) {
__typenameitems {
__typenamekind...ActivityListCoursePlay...ActivityListRangeBullsEye...ActivityListRangeHitIt...ActivityListRangeCaptureTheFlag...ActivityListRangePractice...ActivityListRangeFMD...ActivityListCombine...ActivityListTest...ActivityListScreenCast...ActivityListShotAnalysis...ActivityListVirtualRange...ActivityListSession...ActivityListPerformanceCenter...onSessionActivity {
id
}
...onVirtualRangeSessionActivity {
id
}
...onPerformancePuttingSessionActivity {
id
}
...onSimulatorSessionActivity {
id
}
...onShotAnalysisSessionActivity {
id
}
...onTracySessionActivity {
id
}
...onDynamicReportActivity {
id
}
...onCombineTestActivity {
id
}
...onTestActivity {
id
}
...onScreencastActivity {
id
}
...onVideoActivityType {
id
}
...onRangePracticeActivity {
id
}
...onCoursePlayActivity {
id
}
...onClosestToThePinActivity {
id
}
...onRangeFindMyDistanceActivity {
id
}
...onRangeBullsEyeActivity {
id
}
...onRangeHitItActivity {
id
}
...onRangeCaptureTheFlagActivity {
id
}
...onRangeVirtualGolfPlayActivity {
id
}
...onRangeVirtualGolfPracticeActivity {
id
}
...onPdfReportActivity {
id
}
...onEventReportActivity {
id
}
...onNoteActivity {
id
}
...onPerformanceCenterActivity {
id
}
}
pageInfo {
__typenamehasNextPagehasPreviousPage
}
totalCount
}
}
}
Then I don't explicitly add querying for id on all of these types:
... on SessionActivity {
id
}
... on VirtualRangeSessionActivity {
id
}
... on PerformancePuttingSessionActivity {
id
}
... on SimulatorSessionActivity {
id
}
... on ShotAnalysisSessionActivity {
id
}
... on TracySessionActivity {
id
}
... on DynamicReportActivity {
id
}
... on CombineTestActivity {
id
}
... on TestActivity {
id
}
... on ScreencastActivity {
id
}
... on VideoActivityType {
id
}
... on RangePracticeActivity {
id
}
... on CoursePlayActivity {
id
}
... on ClosestToThePinActivity {
id
}
... on RangeFindMyDistanceActivity {
id
}
... on RangeBullsEyeActivity {
id
}
... on RangeHitItActivity {
id
}
... on RangeCaptureTheFlagActivity {
id
}
... on RangeVirtualGolfPlayActivity {
id
}
... on RangeVirtualGolfPracticeActivity {
id
}
... on PdfReportActivity {
id
}
... on EventReportActivity {
id
}
... on NoteActivity {
id
}
... on PerformanceCenterActivity {
id
}
Having this added behind your back is problematic, especially when you have multiple environments where some types are not present because they have not been released yet.
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered:
Product
Strawberry Shake
Version
14.x + 15.x
Link to minimal reproduction
https://github.com/Cheesebaron/StrawberryShakeQueryMangling
Steps to reproduce
Build the linked example project and check the
obj/berry
output.What is expected?
The generated code and query is different from the one I have in my
.graphql
file and additional types are added to the query. I would expect only the types I explicitly query would end up being queried in the end.What is actually happening?
When you look at the generated files in
ActivitlyListQuery.Client
you will notice in the generated class the following GraphQL query. It is not just a comment, but also what StrawberryShake ends up requesting from the server.When you compare that to the actual query in
activity-list.graphql
:Then I don't explicitly add querying for id on all of these types:
Having this added behind your back is problematic, especially when you have multiple environments where some types are not present because they have not been released yet.
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: