# Querying a custom type

**URL:** <https://community.prismic.io/t/querying-a-custom-type/3709>\
**Category:** Developing with Prismic\
**Tags:** nextjs\
**Created:** [January 25, 2021, 3:54am UTC](https://community.prismic.io/t/querying-a-custom-type/3709 "2021-01-25T03:54:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![social](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@social](https://community.prismic.io/u/social)\
**Post date:** [January 25, 2021, 3:54am UTC](https://community.prismic.io/t/querying-a-custom-type/3709/1 "2021-01-25T03:54:41Z")

</div>

I am trying to query a custom type 'Article' but when viewing the page in the local dev site I am getting slice zone is empty when the document is not empty. I have copied exactly how the page query works but not getting any results.

`import { Client } from '../../prismic'  
import SliceZone from 'next-slicezone'  
import { useGetStaticProps, useGetStaticPaths } from 'next-slicezone/hooks'

import resolver from '../../sm-resolver.js'

const Article = (props) =\> \<SliceZone {...props} resolver={resolver} /\>

// Fetch content from prismic  
export const getStaticProps = useGetStaticProps({  
client: Client(),  
uid: ({ params }) =\> params.uid  
})

export const getStaticPaths = useGetStaticPaths({  
client: Client(),  
type: 'article',  
fallback: true,// process.env.NODE\_ENV === 'development',  
formatPath: ({ uid }) =\> ({ params: { uid } })  
})

export default Article`

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [January 25, 2021, 2:11pm UTC](https://community.prismic.io/t/querying-a-custom-type/3709/3 "2021-01-25T14:11:54Z")

</div>

Hi Connor,

Welcome to the Prismic community.

In order to be able to help you in this, can you tell us if you are getting the Slice zone when you use the rest API, if you don't get any data from the rest API then one reason can be that you didn't publish the document.

And if that doesn't solve this issue then it would be great if you can share the name of your repository (in a private message if necessary) so we further investigate this issue.

Looking forward to your reply,  
Fares

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [February 26, 2021, 10:33am UTC](https://community.prismic.io/t/querying-a-custom-type/3709/5 "2021-02-26T10:33:55Z")

</div>

This issue has been closed due to inactivity. [Flag to reopen](https://community.prismic.io/t/re-open-a-thread/2175).

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 4:45pm UTC](https://community.prismic.io/t/querying-a-custom-type/3709/6 "2021-12-09T16:45:06Z")

</div>


