Skip to content

Can I use custom Scalar Type #602

@1712048533

Description

@1712048533

this is my schema.graphql

scalar Date
type Query {
    findOneStudent:StudentNode
}

type StudentNode{
    ID: ID!
    name: String
    age:Int
    birthday: Date
}

this is my controller

@Controller
public class StudentController {

    @QueryMapping
    Student findOneStudent(){
        return new Student()
                .setID("1").setName("er ha").setAge(10).setBirthday(new Date());
    }

}

I want to use Date type in Spring-Boot-starter-graphql, Can you help me what Should I need do ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: stackoverflowA question that's better suited to stackoverflowstatus: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions