Content relation returns null in document query graphql

Hi everyone,
I have some really frustrating problem with related contents content type.

Beside the annoying bug that doesn't let me set a constrain now i'm also getting an other bug! the query always return { document: null } on my newly created related contents gatsby query

this is my schema:

{
  "Main" : {
"uid" : {
  "type" : "UID",
  "config" : {
    "label" : "uid"
  }
},
"projects" : {
  "type" : "Group",
  "config" : {
    "fields" : {
      "project" : {
        "type" : "Link",
        "config" : {
          "select" : "document",
          "label" : "project"
        }
      }
    },
    "label" : "projects"
  }
}
  }
}

this is my query

prismicProjectsOrdering {
      data {
        projects {
          project {
            document {
              ...on PrismicProject {
                uid
                id
              }
            }
          }
        }
      }
    }

unfortunately the document return always null, however a custom type that i created a while ago, in the same way, so content model > add group > add content relation works fine, the document is filled with the right data, perhaps the only thifference is that in the old one i could set the constrains while in the new one i obviously can't cause of the dropdown bug.

any idea?

thanks

Hello Andrea, welcome to the Community :tada:

At first glance, I cannot tell what the problem might be.

  • Did you add any changes to the Custom types that you may not have added to the JSON schema inside your project?
    What's the name of the query's custom type? prismicProjectsOrdering seems incorrect. Shouldn’t it just be prismicProjects?
  • Can you send me the URL of your repository via dm, please?

Hi @Pau , sure i'll send it thourght. The name it's correct because prismicProjects it's the actual content type for the project but prismicProjectsOrdering is the one i create to be able to sort the projects.

The json is already been updated

[Update] This should be fixed with v3.3.2.