-
-
Notifications
You must be signed in to change notification settings - Fork 748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for custom NodaTime patterns for serialization and deserialization #4801
Add support for custom NodaTime patterns for serialization and deserialization #4801
Conversation
Thank you for contributing back ... @PascalSenn can you review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Pull request! Thanks a lot for this contribution!
Just did some formatting changes and added validation for the input array (so that we do not get a index out of bounds if someone passes in an array)
Sorry for the wait on this will have a look today. |
@david-driscoll this is damn good PR man! Sorry for not taking the time earlier. If you want to get more involved in this project I would be more than happy to have you. |
@david-driscoll join us on slack: https://slack.chillicream.com I have created a new release 12.7 |
* Update requirement of package (ChilliCream#4461) * Fixed mutation convention with ID attribute (ChilliCream#4639) * Updated BCP preview links * Updated Banana Cake Pop V22 (ChilliCream#4644) * Fixed mutation convention runtime type determination (ChilliCream#4645) * Added banners for blog articles * Handle if errors prop exsits even if we have an response exception (ChilliCream#3928) Co-authored-by: Pascal Senn <senn.pasc@gmail.com> * Hot Chocolate 12.5 Release Blog (ChilliCream#4570) * Fixed Spelling * Website Cleanup * Cleanup tabs (Website) * Fixed Website Layout * Integrated Apollo Federation Support in Build (ChilliCream#4650) * Added SkipIntrospectionFields option on MaxDepthAnalyzer (ChilliCream#4649) * Fixed Website Build Issues * Added Security Policy * Update Security Policy * Fixed mutation convention for ListType payload (ChilliCream#4653) * Added CodeQL * Removed JavaScript from CodeQL * Use Build Scripts with CodeQL * Reworked CodeQL Build * Updated CodeQL to install the dotnet SDK * Fixed CodeQL dotnet build command. * Fixed Website Layout Bug * Website: Added Material UI * Fixed Website Layout Issues * Added error limits to the document validation. (ChilliCream#4655) * New Website Search * Fixed Badges * Website Launch Button * Fixed typo in mutations documentation (ChilliCream#4656) * Fixed problems with benchmarks and adds reference results (ChilliCream#4659) * Add note for xml docs + custom naming convention (ChilliCream#4661) * Fixed ApolloFederation Printer (ChilliCream#4663) * Refined ID attribute to allow use of IDAttribute also without global ID policy (ChilliCream#4667) * Update issue templates (ChilliCream#4671) * Update feature_request.yml * Update bug_report.yml * Add note about field member to migration document (ChilliCream#4674) * Added support for DateOnly and TimeOnly in MongoDB (ChilliCream#4654) Co-authored-by: David De Smet <2607383+idaviddesmet@users.noreply.github.com> Co-authored-by: Pascal Senn <senn.pasc@gmail.com> * Reference Resolver Refinement (ChilliCream#4672) * Fixed Reference Resolvers (ChilliCream#4678) * Update "Get started" guide (ChilliCream#4451) * Update MongoDB Connection Documentation (ChilliCream#4681) * Reworked External Field Handling (ChilliCream#4684) * Added Apollo Federation Code-First Example (ChilliCream#4687) * Refined Federation Printer for Custom Schema Directives (ChilliCream#4691) * Website: Fixed heading color * Bump Stackexchange.Redis to 2.2.88 (ChilliCream#4693) * Fixed deprecation in federation schema printer. (ChilliCream#4694) * Added DataLoader Batching Diagnostics (ChilliCream#4695) * Adds pure resolver for stitching (ChilliCream#4702) * Fixing minor typo in mongodb documentation (ChilliCream#4699) * Added Schema Source Generator (ChilliCream#4708) * Fixed Snapshots * Reintroduced PaginationAmount for legacy paging support (ChilliCream#4709) * Fixed Breaking Change (ChilliCream#4710) * Fixed Stitching Test * Fixed concurrency issue with DataLoader (ChilliCream#4718) * Added support for schema building directives when using schema-first. (ChilliCream#4723) * Added Helpers for JSON types (ChilliCream#4725) * Fixed issue were schema-first input runtime types were not correctly inferred. (ChilliCream#4727) * Fix spelling error (ChilliCream#4729) * Fixed grammar (ChilliCream#4730) * Fixed warnings in automapper package (ChilliCream#4728) * Fixed interface inference issue when using schema-first (ChilliCream#4731) * Reworked Types Analyzer to auto-register DataLoader (ChilliCream#4732) * Added Analyzer to Templates (ChilliCream#4733) * Adds deprecation of input fields and arguments (ChilliCream#4630) * Added StrawberryShake Code Generator Server (ChilliCream#4742) * Updated Release Build * Fixed StrawberryShake Visual Studio issues * Fixed schema-first input enum binding. (ChilliCream#4750) * Cleanup StrawberrShake Generator Test Projects (ChilliCream#4751) * Rename root activity before operation is known (ChilliCream#4749) * Fixed StrawberryShake MSBuild integration (ChilliCream#4762) * Added fetch once DataLoader (ChilliCream#4767) * Remove the need to declare scalars when doing schema stitching (ChilliCream#4769) * Removed Stitching From Source Generator (ChilliCream#4770) * Updated Release Build * Reworked Publish * Fixed Snapshots * Fixed build error that published all dlls in the output folder. * Reworked Source Generator Deployment * Reworked how we build the code generation server * Updated Sonar Build Restore * Changed Build VM * Exclude Source Generators from Sonar Build * Fixed Sonar Issue in Mongo Package (ChilliCream#4776) * Reworked code generation for better compatibility with classic .NET (ChilliCream#4768) * Abstracted Transport Handling in Schema Stitching (ChilliCream#4777) * Added support for subscription stitching (ChilliCream#4786) * Updated BCP to Version 1p23 (ChilliCream#4787) * Fixed Compile Error * @defer support for StrawberryShake (ChilliCream#4753) * Update Neo4JDataRequestBuilderExtensions.cs (ChilliCream#4807) * Updated BCP to Preview 25 * Use Default Values in UsePagingAttribute (ChilliCream#4815) (ChilliCream#4816) * Added graphql-ws support (ChilliCream#4793) * Updated BCP to Preview 26 * GraphQL over WebSocke fixes. (ChilliCream#4819) * Add default arguments to IEndpointRouteBuilder Map methods (ChilliCream#4792) * Add default arguments to Map methods * Add ArgumentNullExceptions Co-authored-by: Michael Staib <michael@chillicream.com> * Document dependency injection / Entity Framework Core (ChilliCream#4817) * Fixed Typos. (ChilliCream#4830) * Error message grammar (ChilliCream#4829) Co-authored-by: Michael Staib <michael@chillicream.com> * Added a utility to communicate with graphql-ws (ChilliCream#4820) * Add support for custom NodaTime patterns for serialization and deserialization (ChilliCream#4801) * Reorganized Transport Tests (ChilliCream#4834) * Fix Website Release Pipeline (ChilliCream#4836) Co-authored-by: Jari Pennanen <ciantic@oksidi.com> Co-authored-by: PascalSenn <senn.pasc@gmail.com> Co-authored-by: Rafael Staib <rafael@chillicream.com> Co-authored-by: Michael Staib <michael@chillicream.com> Co-authored-by: Kim Svensson <61824112+allmightyse@users.noreply.github.com> Co-authored-by: Aleksey Bogomolov <horse315@gmail.com> Co-authored-by: Daniel Granerud <86605963+nullableexception@users.noreply.github.com> Co-authored-by: martetassyns <78635303+martetassyns@users.noreply.github.com> Co-authored-by: Ben McCallum <ben.mccallum@live.com.au> Co-authored-by: David De Smet <2607383+daviddesmet@users.noreply.github.com> Co-authored-by: David De Smet <2607383+idaviddesmet@users.noreply.github.com> Co-authored-by: Tobias Tengler <45513122+tobias-tengler@users.noreply.github.com> Co-authored-by: itmuckel <michael.bachner@outlook.de> Co-authored-by: stxwright <14978758+stxwright@users.noreply.github.com> Co-authored-by: Mikkel Hansen <92272397+mhnisportal@users.noreply.github.com> Co-authored-by: Gabriel Lucaci <gabriel.lucaci.dev@gmail.com> Co-authored-by: avisra <chris@avisra.com> Co-authored-by: Trey Mack <tmack10@gmail.com> Co-authored-by: grounzero <16921017+grounzero@users.noreply.github.com> Co-authored-by: David Driscoll <david.driscoll@gmail.com>
@michaelstaib I'm on the slack, and tend to lurk 😄 |
Summary of the changes (Less than 80 chars)
Currently NodaTime types are limited to specific patterns that can be accepted for deserialization. This makes it harder to allow more flexibility in deserialization, for example accept the default
DateTimeOffset
format and turn that into anInstant
orOffsetDateTime
.OffsetDateTimeType
has been usingOffsetDateTimePattern.GeneralIso
for serialization butOffsetDateTimePattern.ExtendedIso
for deserialization. This behavior has been maintained (even if it might a bug)Comments:
I'm not sure if you want the additional tests in other files, based on the file names not matching the test class names, I just simply left them in the same file. This can ofc be changed.