Skip to content

define custom dgraphType result in unexpected schema #36

@joeslee

Description

@joeslee

schema define:

@Node({
  dgraphType: 'Post'
})
export class PostEntity {
  @Property({
    type: PropertyType.String
  })
  title: string;
}

schema build output:

type Post {
  PostEntity.title: string // prefix is classname and type restrict  is unnecessary.
}
PostEntity.title: string .

expect output:

type Post {
  Post.title
}
Post.title: string .

It works well, but the result is not expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions