Skip to content

Commit

Permalink
Prevent error after hot reload: Operation is not valid due to the cur…
Browse files Browse the repository at this point in the history
…rent state of the object. (DateTimeType) (#1227)

* Prevent error after hot reload: Operation is not valid due to the current state of the object. (DateTimeType)
Stumbled upon this solution here: ChilliCream/graphql-platform#2985 (comment)

* remove manually added graphql types which are automatically defined

---------

Co-authored-by: Kevin Hahn <[email protected]>
  • Loading branch information
myieye and hahn-kev authored Nov 12, 2024
1 parent 85f9555 commit 4cfc4b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 0 additions & 4 deletions backend/LexBoxApi/GraphQL/GraphQlSetupKernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ public static void AddLexGraphQL(this IServiceCollection services, IHostEnvironm
options.IncludeExceptionDetails = true;
})
.AddType<DbErrorCode>()
.AddType(new DateTimeType("DateTime"))
.AddType(new UuidType("UUID"))
.AddType(new DateTimeType("timestamptz"))
.AddType(new UuidType("uuid"))
.AddInstrumentation(options =>
{
options.IncludeDocument = true;
Expand Down
7 changes: 2 additions & 5 deletions frontend/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1248,13 +1248,10 @@ directive @listSize("The `assumedSize` argument can be used to statically define
"The `@specifiedBy` directive is used within the type system definition language to provide a URL for specifying the behavior of custom scalar definitions."
directive @specifiedBy("The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types." url: String!) on SCALAR

"The `DateTime` scalar represents an ISO-8601 compliant date time type."
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")

"The `Long` scalar type represents non-fractional signed whole 64-bit numeric values. Long can represent values between -(2^63) and 2^63 - 1."
scalar Long

scalar UUID

scalar timestamptz @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")

scalar uuid
scalar UUID @specifiedBy(url: "https:\/\/tools.ietf.org\/html\/rfc4122")

0 comments on commit 4cfc4b5

Please sign in to comment.