Vansterhant.Addon.Optimizely.GraphQL 1.0.37-pre

This is a prerelease version of Vansterhant.Addon.Optimizely.GraphQL.
dotnet add package Vansterhant.Addon.Optimizely.GraphQL --version 1.0.37-pre                
NuGet\Install-Package Vansterhant.Addon.Optimizely.GraphQL -Version 1.0.37-pre                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Vansterhant.Addon.Optimizely.GraphQL" Version="1.0.37-pre" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Vansterhant.Addon.Optimizely.GraphQL --version 1.0.37-pre                
#r "nuget: Vansterhant.Addon.Optimizely.GraphQL, 1.0.37-pre"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Vansterhant.Addon.Optimizely.GraphQL as a Cake Addin
#addin nuget:?package=Vansterhant.Addon.Optimizely.GraphQL&version=1.0.37-pre&prerelease

// Install Vansterhant.Addon.Optimizely.GraphQL as a Cake Tool
#tool nuget:?package=Vansterhant.Addon.Optimizely.GraphQL&version=1.0.37-pre&prerelease                

Optimizely CMS GraphQL AddOn

This project is a powerful add-on for the Optimizely CMS that enables a GraphQL endpoint. It provides typed model access to all content models available in the system, allowing for efficient and flexible data fetching.

Technologies

The project is built using:

  • C# as the primary programming language.
  • Hot Chocolate, a GraphQL server library for .NET platforms.
  • Source Generation, a feature of the C# compiler that enables compile-time metaprogramming.

Features

  • Typed Model Access: This add-on provides typed model access to all content models in the system.
  • GraphQL Endpoint: It exposes a GraphQL endpoint, allowing clients to request exactly the data they need, reducing over-fetching and improving performance.
  • Integration with Optimizely CMS: The add-on is designed to work seamlessly with Optimizely CMS, a popular content management system.

How to Use

The addon is provided as a NuGet package. To get started, install the:
Vansterhant.Addon.Optimizely.GraphQL package into your Optimizely CMS project.

Then add the following code to your Startup.cs file:


public void ConfigureServices(IServiceCollection services)
{
    // ...
    services.AddOptimizelyGraphQL();
    // ...
    
    
    app.UseEndpoints(endpoints =>
    {
        // ...
        endpoints.MapGraphQL();
        // ...
    });
}

The GraphQL endpoint will now be available at /graphql. If one wishes to change the url, a string can be passed as an argument to the MapGraphQL method.

Testing it out

Navigate to the endpoint in a browser. You should see a GraphQL playground, which allows you to explore the schema and test queries.

GraphQL Playground

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

If you have any questions or feedback, please feel free to open an issue.


Please note that this is a brief overview of the project. For more detailed information, please dig into the source code. Happy coding! 🚀

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.37-pre 109 12/1/2023
1.0.36-pre 74 12/1/2023