Skip to content

Conversation

@Migushthe2nd
Copy link

@Migushthe2nd Migushthe2nd commented Sep 25, 2021

Fixes #9

This PR makes it so that the primary columns are always selected.
This will prevent joined relations from becoming null if no table column is selected

@Migushthe2nd
Copy link
Author

Migushthe2nd commented Sep 25, 2021

This PR requires additional work in order to support for example __typename. Since it is not included in the tree.fields, the join (previews below) is added, but no field is selected.
An example query would be

query {
  layout(id: "db") {
    previews {
      __typename
    }
  }
}

@Migushthe2nd
Copy link
Author

Migushthe2nd commented Sep 25, 2021

Additional check was implemented. It will now check in the EntityMetadata if a field is a relation, instead of checking if field.fields.length > 0. This fixes __typename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue: relations are null when joined fields are all null

1 participant