Skip to content
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 NativeAOT sample; bump GraphQL.NET to 8.3.0 #1180

Merged
merged 9 commits into from
Mar 4, 2025
Merged

Conversation

Shane32
Copy link
Member

@Shane32 Shane32 commented Jan 16, 2025

Adds a working sample of a GraphQL.NET Server running on .NET 8 Native AOT, plus CI tests to verify that it operates correctly after being AOT compiled. Since the sample schema in Samples.Schemas.Chat used for the rest of the projects is type-first, not recommended for Native AOT, this sample only provides a simple 'hello world' schema.

See also:

@Shane32 Shane32 self-assigned this Jan 16, 2025
@Shane32 Shane32 changed the title Add NativeAOT sample Add NativeAOT sample; bump GraphQL.NET to 8.3.0 Jan 16, 2025
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<PublishAot>true</PublishAot>
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
Copy link
Member Author

@Shane32 Shane32 Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is required for GraphQL.NET. Note that GraphQL.NET and GraphQL.NET Server will use their JsonConverter implementations for all serialization and deserialization, so the serializer is not actually using reflection (afaik).

@Shane32 Shane32 merged commit 09cddda into master Mar 4, 2025
11 checks passed
@Shane32 Shane32 deleted the nativeaot_sample branch March 4, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant