Skip to content
This repository was archived by the owner on Dec 25, 2022. It is now read-only.

Missing fields in result #34

Open
chrneumann opened this issue Sep 21, 2021 · 4 comments
Open

Missing fields in result #34

chrneumann opened this issue Sep 21, 2021 · 4 comments

Comments

@chrneumann
Copy link

Hey,

for a Schema like this:

        rootKey: 'stations',
        schemas: {
          stations: `
            features: [features]
          `,
          features: `
            properties: properties
            geometry: geometry
          `,
          properties: `
            name: String
          `,
          geometry: `
            coordinates: [Float]
          `,

And a query like this:

query MyQuery {
  allFeatures {
    totalCount
    edges {
      node {
        id
        properties {
          name
        }
      }
    }
  }
}

I get incomplete results (properties is null):

{
  "data": {
    "allFeatures": {
      "totalCount": 5556,
      "edges": [
        {
          "node": {
            "id": "d92c142e-fd57-56e7-8c7e-d5401d119dd2",
            "properties": null
          }
        },
[...]

Querying for allProperties or allGeometry works as expected. Is this a Bug (sounds like #8)?

@chrneumann
Copy link
Author

#32 seems similar

@chrneumann
Copy link
Author

And it seems to work if I don't supply a schema at all and only use allStations.

@mikerudge
Copy link

@chrneumann did you find a solution to this. Pretty sure I am getting the same thing

In the following example, interests is fine but every other type returns null.

const articles = `
user: ArticleUser
post_type: PostType
interests: [Interest]
images: ArticleImage
`;

const ArticleImage = `
banner: String
thumbnail: String
square: String
full: String
`;

const Interest = `
date: String
hidden: Boolean
ID: Int
link: String
slug: String
title: String
tag: String
`;

@chrneumann
Copy link
Author

No, I wrote a custom plugin that downloads the data to a .json. After that, I use gatsby-transformer-json to access the data.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants