# \[BUG\] Wrong .url field using graphquery option

**URL:** <https://community.prismic.io/t/bug-wrong-url-field-using-graphquery-option/12720>\
**Category:** Developing with Prismic\
**Created:** [March 17, 2023, 2:18pm UTC](https://community.prismic.io/t/bug-wrong-url-field-using-graphquery-option/12720 "2023-03-17T14:18:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessandro.scandone](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@alessandro.scandone](https://community.prismic.io/u/alessandro.scandone)\
**Post date:** [March 17, 2023, 2:18pm UTC](https://community.prismic.io/t/bug-wrong-url-field-using-graphquery-option/12720/1 "2023-03-17T14:18:11Z")

</div>

Hello prismic team!  
I've encountered a weird error using the graphquery option of the js client:

Here's the minimal reproduction:

**Route resolver object:**

```js
[
  // ...
  {
    type: 'guide',
    resolvers: {
      product: 'product_type',
    },
    path: '/:product/guide/:uid',
  },
]

```

**Client code:**

```ts
const FAQ_FOLDER_BY_UID_QUERY = `{
  faq_folder {
    page_category {
      page_category_relationship {
        ... on faq_category {
          faq_category_group {
            faq_category_group_relationship {
              ...on faq {
                faq_content
              }
            }
          }
        }
      }
    }
  }
}`;

const { data } = await client.getByUID('faq_folder', 'my-document-uid', {
  graphQuery: FAQ_FOLDER_BY_UID_QUERY,
});

```

**Expected result:**

The resulting JSON should contain a span like:

```js
// inside the faq_content field
{
  "type": "guide",
  "uid": "linked-document-uid",
  "url": "product-uid/guide/linked-document-uid",
  "link_type": "Document",
  "isBroken": false
}

```

**Actual result:**  
The resulting json looks like:

```js
// inside the faq_content field
{
  "type": "guide",
  "uid": "linked-document-uid",
  "url": ">&<018Y-5VjRAAACMAwUCe%%/guide/linked-document-id",
  "link_type": "Document",
  "isBroken": false
}

```

Thank you in advance for you help

---

<div class="post-metadata">

**Author:** ![racheal.orukele](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@racheal.orukele](https://community.prismic.io/u/racheal.orukele)\
**Post date:** [March 23, 2023, 12:50pm UTC](https://community.prismic.io/t/bug-wrong-url-field-using-graphquery-option/12720/3 "2023-03-23T12:50:04Z")

</div>

Hello @alessandro.scandone,

My apologies for just responding to this.

I ran the code snippet that you provided, and I got an error:

```auto
Error: [Link resolver error] Invalid resolver product in page type guide
The content relationship product_type doesn't exist on the top level of the custom type guide

```

Can you check the content relationship in your `guide` custom type and make sure it's limited to one type?

Thanks,  
Racheal.
