Skip to content

@vue/apollo-composable / useFragment / Options

Interface: Options ​

Options for useFragment.

1. Fragment ​

fragment ​

fragment: MaybeRefOrGetter<DocumentNode>

A GraphQL fragment document.


fragmentName? ​

optional fragmentName: MaybeRefOrGetter<string>

Name of the fragment to use if document contains multiple fragments.


variables? ​

optional variables: MaybeRefOrGetter<ReactiveVariablesParameter>

Variables for the fragment.

2. Data Source ​

from ​

from: MaybeRefOrGetter<FromValue | FromValue[]>

Cache identifiable entity to read the fragment from.

3. Configuration ​

clientId? ​

optional clientId: string

ID of a named Apollo client to use.


optimistic? ​

optional optimistic: boolean

Read from optimistic cache data.

Default Value ​

ts
true

Released under the MIT License.