Thursday 25 July 2019

Fetching time from database with GraphQL

I'm creating a GrahpQL API on top of an existing database in MySQL, using Typescript, TypeORM and TypeGrapgQL for the models. When I try fetching data from a field with type "time" in the database, it always returns null. When I copy the generated SQL-query to MySQL, I get the right result. How can I fetch time from the database with GraphQL?Example of column I want to fetch from:@Column("time", { nullable: true })@Field({ nullable: true })start_time: Date;

Submitted July 26, 2019 at 07:09AM by DefectUnicorn94

No comments:

Post a Comment