<h3>Info</h3>
<p>I found this info in a GitHub comment by Brandon Kelly: <a href="https://github.com/craftcms/cms/issues/6273#issuecomment-652042120" rel="nofollow noreferrer">commented on 30 Jun 2020</a></p>
<hr />
<p>The <code>enabledForSite</code> param is now deprecated and set to <code>false</code> by default (as in “don’t worry about it”).</p>
<p>It is now solely the <code>status</code> param’s responsibility to worry about elements’ site statuses.</p>
<ul>
<li><code>enabled</code> will give you elements that are enabled both globally and for the current site.</li>
<li><code>disabled</code> will give you elements that are disabled either globally or for the current site (or both).</li>
</ul>
<hr />
<h3>Solution</h3>
<p>Use <code>status: &quot;enabled&quot;</code> instead of <code>enabledForSite: true</code>.</p>

CC BY-SA 4.0
2022-01-03T14:58:16.133Z
2022-01-03T14:58:16.133Z
Mario
<p>Based on the docs <a href="https://craftcms.com/docs/3.x/graphql.html#the-entries-query" rel="nofollow noreferrer">https://craftcms.com/docs/3.x/graphql.html#the-entries-query</a> <code>enabledForSite</code> can be used for entries. This works for me to get the enabled entries, however I get a deprecation error in Utilities &gt; Deprecation Warnings:</p>
<blockquote>
<p>The enabledForSite element query param has been deprecated.
status() should be used instead.</p>
</blockquote>
<p>But when using <code>status: &quot;live&quot;</code></p>
<p>The query does not work and I get the following error back:</p>
<blockquote>
<p>Unknown argument &quot;status&quot; on field &quot;entries&quot; of type &quot;Query&quot;</p>
</blockquote>
<p>Which makes sense as I cannot find it in the docs. It seems to me like <code>enabledForSite</code> is what I am looking for and cannot understand why it is giving this warning.</p>

<graphql>
How to get enabled entry with GraphQL, enabledForSite has been deprecated?
# How to get enabled entry with GraphQL, enabledForSite has been deprecated?

(Asked by: username_0 on 2021-11-22)

Based on the docs <https://craftcms.com/docs/3.x/graphql.html#the-entries-query> `enabledForSite` can be used for entries. This works for me to get the enabled entries, however I get a deprecation error in Utilities > Deprecation Warnings:

> The enabledForSite element query param has been deprecated.
> status() should be used instead.

But when using `status: "live"`

The query does not work and I get the following error back:

> Unknown argument "status" on field "entries" of type "Query"

Which makes sense as I cannot find it in the docs. It seems to me like `enabledForSite` is what I am looking for and cannot understand why it is giving this warning.

**Tags:** graphql


---

## 1 answers

### Answer by username_1 on 2022-01-03. Score: 2

### Info

I found this info in a GitHub comment by Brandon Kelly: [commented on 30 Jun 2020](https://github.com/craftcms/cms/issues/6273#issuecomment-652042120)

---

The `enabledForSite` param is now deprecated and set to `false` by default (as in “don’t worry about it”).

It is now solely the `status` param’s responsibility to worry about elements’ site statuses.

* `enabled` will give you elements that are enabled both globally and for the current site.
* `disabled` will give you elements that are disabled either globally or for the current site (or both).

---

### Solution

Use `status: "enabled"` instead of `enabledForSite: true`.


---

