diff --git a/packages/test-e2e-composable-vue3/src/components/ChannelList.vue b/packages/test-e2e-composable-vue3/src/components/ChannelList.vue index 09561058..4e318104 100644 --- a/packages/test-e2e-composable-vue3/src/components/ChannelList.vue +++ b/packages/test-e2e-composable-vue3/src/components/ChannelList.vue @@ -13,10 +13,14 @@ export default defineComponent({ const { result, loading } = useQuery<{ channels: Channel[] }>(gql` query channels { channels { - id - label + ...channel } } + + fragment channel on Channel { + id + label + } `) const channels = computed(() => result.value?.channels ?? []) diff --git a/packages/test-e2e-composable-vue3/src/components/ChannelView.vue b/packages/test-e2e-composable-vue3/src/components/ChannelView.vue index b79e2a6e..32747a92 100644 --- a/packages/test-e2e-composable-vue3/src/components/ChannelView.vue +++ b/packages/test-e2e-composable-vue3/src/components/ChannelView.vue @@ -22,12 +22,16 @@ export default defineComponent({ const { result, loading, refetch } = useQuery(gql` query channel ($id: ID!) { channel (id: $id) { + ...channelView + } + } + + fragment channelView on Channel { + id + label + messages { id - label - messages { - id - text - } + text } } `, () => ({