-
-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
- Operating System: Darwin
- Node Version: v22.14.0
- Nuxt Version: 3.15.4
- CLI Version: 3.22.4
- Nitro Version: 2.11.2
- Package Manager: [email protected]
- Builder: -
- User Config: runtimeConfig, graphql-client, site, seo, devtools, nitro, build, css, modules, components, googleFonts, pwa, dayjs, i18n, image, sentry, compatibilityDate
- Runtime Modules: @nuxtjs/[email protected], @kevinmarrec/[email protected], @nuxtjs/[email protected], @nuxt/[email protected], @nuxtjs/[email protected], @pinia/[email protected], [email protected], @nuxtjs/[email protected], @sentry/nuxt/[email protected], [email protected]
- Build Modules: -
Describe the bug
I have the following query:
query Business_settings($filter: business_settings_filter, $skipUsers: Boolean = true) {
business_settings(filter: $filter) {
date_created
date_updated
dotoo_job_plan_ahead_count
enable_dotoo_jobs
id
sort
status
business {
id
status
sort
date_created
date_updated
name
slug
about
cover_image {
id
storage
filename_disk
filename_download
title
}
logo {
id
storage
filename_disk
filename_download
title
}
users @skip(if: $skipUsers) {
id
type
directus_users_id {
id
first_name
last_name
email
status
avatar {
id
title
description
filename_disk
filename_download
}
}
businesses_id {
id
}
}
}
promotion_images {
id
directus_files_id {
id
storage
filename_disk
filename_download
title
}
}
}
}Now when I use this like this:
const res = await GqlBusiness_settings({
filter: { business: { slug: { _eq: slug } } },
skipUsers: true,
})I get an GQL error:
{
"errors": [
{
"message": "GraphQL validation error.",
"extensions": {
"errors": [
{
"message": "Cannot query field \"first_name\" on type \"directus_users\".",
"locations": [
{
"line": 39,
"column": 11
}
]
},
{
"message": "Cannot query field \"last_name\" on type \"directus_users\".",
"locations": [
{
"line": 40,
"column": 11
}
]
},
{
"message": "Cannot query field \"avatar\" on type \"directus_users\".",
"locations": [
{
"line": 43,
"column": 11
}
]
}
],
"code": "GRAPHQL_VALIDATION"
}
}
]
}
So the @Skip is ignored it seems!
In chrome networking tab, I see these variables for the request:
{
"filter": {
"business": {
"slug": {
"_eq": "bootcamp-soldiers"
}
}
},
"skipUsers": true
}
So that is correct!
Expected behaviour
To skip the user node
Reproduction
No response
Additional context
No response
Logs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working