Skip to content

Schema generation removing non-null rules #260

@anderson900

Description

@anderson900

We've noticed that the final GQL schema generated by Cruddl seems to be lacking non-null (!) rules that are present in the original model.

For example:

type Group @rootEntity(flexSearch: true, flexSearchLanguage: EN) {
  name: String!
  type: String
}

generates:

type Group {
  """
  An auto-generated string that identifies this root entity uniquely among others of the same type
  """
  id: ID!

  """The instant this object has been created"""
  createdAt: DateTime!

  """
  The instant this object has been updated the last time (not including relation updates)
  """
  updatedAt: DateTime!
  name: String
  type: String

  """
  Provides a value that can be supplied to the `after` argument for pagination. Depends on the value of the `orderBy` argument.
  """
  _cursor: String

  """
  An identifier that is updated automatically on each update of this root entity (but not on relation changes)
  """
  _revision: ID!
}

The same issue applies to the mutation input types, e.g. CreateGroupInput as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions