vuestorefront / storyblok

MOVED TO https://github.com/vuestorefront/vue-storefront/tree/legacy/packages/storyblok
https://docs.vuestorefront.io/storyblok/
12 stars 5 forks source link

Pagination data is not available #21

Open wbm-sbasler opened 2 years ago

wbm-sbasler commented 2 years ago

From the storyblok documentation, the pagiantion data will be in the response headers. https://www.storyblok.com/docs/api/content-delivery#topics/pagination

But the content object from useContent does not provide these informations.

We are using the actual 0.3.0. release

Examplecode:

const { search, content, loading, error } = useContent(`BlogListing-${props.type}${route.value.query.cid}`);

const custom = {
      starts_with: `${root.$i18n.locale}/`,
      sort_by: 'content.datePublished:desc',
      page: currentPage,
      per_page: 3,
      filter_query: {
        component: {
          in: 'PageBlog',
        },
      },
    };

onSSR(async () => {
      await search({
        cache: true,
        relations: 'PageBlog.author',
        custom: custom,
      });
    });

Expectation: The following data will be provided in content object

per-page: 2
total: 3

Actual Result: Pagination data not available