To run a query within a React component, call useGetMediaImageQuery and pass it any options that fit your needs.
When your component renders, useGetMediaImageQuery 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 } = useGetMediaImageQuery({ variables: { id:// value for 'id' smallBestFit: // value for 'smallBestFit' mediumBestFit: // value for 'mediumBestFit' largeBestFit: // value for 'largeBestFit' }, });
useGetMediaImageQuery
To run a query within a React component, call
useGetMediaImageQuery
and pass it any options that fit your needs. When your component renders,useGetMediaImageQuery
returns an object from Apollo Client that contains loading, error, and data properties you can use to render your UI.Example