fix: querying by polymorphic join field relationTo with overrideAccess: false (#11999)
Previously, querying by polymorphic joins `relationTo` with `overrideAccess: false` caused an error: ``` QueryError: The following paths cannot be queried: relationTo ``` As this field actually doesn't exist in the schema. Now, under condition that the query comes from a polymorphic join we skip checking `relationTo` field access.
This commit is contained in:
@@ -222,6 +222,7 @@ export default buildConfigWithDefaults({
|
||||
},
|
||||
{
|
||||
slug: 'multiple-collections-parents',
|
||||
access: { read: () => true },
|
||||
fields: [
|
||||
{
|
||||
type: 'join',
|
||||
@@ -236,6 +237,7 @@ export default buildConfigWithDefaults({
|
||||
},
|
||||
{
|
||||
slug: 'multiple-collections-1',
|
||||
access: { read: () => true },
|
||||
admin: { useAsTitle: 'title' },
|
||||
fields: [
|
||||
{
|
||||
@@ -255,6 +257,7 @@ export default buildConfigWithDefaults({
|
||||
},
|
||||
{
|
||||
slug: 'multiple-collections-2',
|
||||
access: { read: () => true },
|
||||
admin: { useAsTitle: 'title' },
|
||||
fields: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user