To run a query within a React component, call useListCollectionsQuery and pass it any options that fit your needs.
When your component renders, useListCollectionsQuery returns an object from Apollo Client that contains loading, error, and data properties
you can use to render your UI.
Example
const { data, loading, error } = useListCollectionsQuery({ variables: { profileId:// value for 'profileId' first: // value for 'first' after: // value for 'after' discriminator: // value for 'discriminator' }, });
useListCollectionsQuery
To run a query within a React component, call
useListCollectionsQuery
and pass it any options that fit your needs. When your component renders,useListCollectionsQuery
returns an object from Apollo Client that contains loading, error, and data properties you can use to render your UI.Example