Skip to content

How to support read_only_fields and write_only_fields for django rest framework serializer? #385

Closed
@legshort

Description

@legshort

I was hoping If I can link read_only_fiedls and write_only_fields from DRF with graphene so that mutation arguments and payload have different fields each other.

For example, name is a write-only field and created_at is a read-only field.

mutation {
  createPost (input: {name: "new-name"}) {
    post {
      created_at
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions