VOOZH about

URL: https://www.nuget.org/packages/GraphQL.IntrospectionModel/

⇱ NuGet Gallery | GraphQL.IntrospectionModel 0.0.22


ο»Ώ

πŸ‘ Image
GraphQL.IntrospectionModel 0.0.22

dotnet add package GraphQL.IntrospectionModel --version 0.0.22
 
 
NuGet\Install-Package GraphQL.IntrospectionModel -Version 0.0.22
 
 
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="GraphQL.IntrospectionModel" Version="0.0.22" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GraphQL.IntrospectionModel" Version="0.0.22" />
 
Directory.Packages.props
<PackageReference Include="GraphQL.IntrospectionModel" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GraphQL.IntrospectionModel --version 0.0.22
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GraphQL.IntrospectionModel, 0.0.22"
 
 
#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.
#:package GraphQL.IntrospectionModel@0.0.22
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GraphQL.IntrospectionModel&version=0.0.22
 
Install as a Cake Addin
#tool nuget:?package=GraphQL.IntrospectionModel&version=0.0.22
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

graphql-introspection-model

<a href="https://www.buymeacoffee.com/sungam3r" target="_blank"><img src="https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>

πŸ‘ License

πŸ‘ codecov
πŸ‘ Nuget
πŸ‘ NuGet

πŸ‘ GitHub Release Date
πŸ‘ GitHub commits since latest release (by date)
πŸ‘ Size

πŸ‘ GitHub contributors
πŸ‘ Activity
πŸ‘ Activity
πŸ‘ Activity

πŸ‘ Run unit tests
πŸ‘ Publish preview to GitHub registry
πŸ‘ Publish release to Nuget registry
πŸ‘ CodeQL analysis

Types for GraphQL introspection model. Used by graphql-sdl-exporter.

A GraphQL server supports introspection over its schema. This schema is queried using GraphQL itself, creating a powerful platform for tool‐building.

Here's what a "classic" introspection query looks like:

query IntrospectionQuery {
 __schema {
 queryType { name }
 mutationType { name }
 subscriptionType { name }
 types {
 ...FullType
 }
 directives {
 name
 description
 locations
 args {
 ...InputValue
 }
 }
 }
}

fragment FullType on __Type {
 kind
 name
 description
 fields(includeDeprecated: true) {
 name
 description
 args {
 ...InputValue
 }
 type {
 ...TypeRef
 }
 isDeprecated
 deprecationReason
 }
 inputFields {
 ...InputValue
 }
 interfaces {
 ...TypeRef
 }
 enumValues(includeDeprecated: true) {
 name
 description
 isDeprecated
 deprecationReason
 }
 possibleTypes {
 ...TypeRef
 }
}

fragment InputValue on __InputValue {
 name
 description
 type { ...TypeRef }
 defaultValue
}

fragment TypeRef on __Type {
 kind
 name
 ofType {
 kind
 name
 ofType {
 kind
 name
 ofType {
 kind
 name
 ofType {
 kind
 name
 ofType {
 kind
 name
 ofType {
 kind
 name
 ofType {
 kind
 name
 }
 }
 }
 }
 }
 }
 }
}

The result of this query (like all other GraphQL queries) is JSON. You can deal with it directly or deserialize it into some data structures. Such data structures are provided by this repository. The top level type is . After deserialization JSON into the GraphQLResponse (or after creating GraphQLSchema in any other way), it can be transformed into AST representation and then printed by SDLPrinter from GraphQL-Parser nuget package.

Example of deserializing introspection response
using System.Text.Json;

string text = ...; // from HTTP introspection response
var response = JsonSerializer.Deserialize<GraphQLResponse>(text, new JsonSerializerOptions
{
 PropertyNameCaseInsensitive = true,
 Converters = { new JsonStringEnumConverter() }
});
var schema = response.Data.__Schema; // note that Data may be null, so check response.Errors 
Example of printing GraphQLSchema into SDL
GraphQLSchema schema = ...;

var converter = new ASTConverter();
var document = converter.ToDocument(schema);
var printer = new SDLPrinter(options);
var sdl = printer.Print(document);

// or use one-line extension method
var sdl = schema.Print();

GraphQL has its own language to write GraphQL schemas, SDL - Schema Definition Language. SDL is simple and intuitive to use while being extremely powerful and expressive. Some examples of SDL documents can be found in graphql-sdl-exporter project.

Many types in this project implement the interface. It serves to obtain information about the directives applied to the element. The official specification does not describe such a possibility, although discussions are underway to expand the specification to add this feature. graphql-sdl-exporter can get information about directives if the server supports this feature.

Variations of introspection query

This repo provides 4 variations of :

  1. Classic - "classic" introspection query provided above (without exposing applied directives). It conforms to the latest release version of the spec.
  1. ClassicDraft - the same as "classic" + deprecations for input values. See PR for more info. It conforms to the prerelease (working draft) version of the spec.

  2. Modern - modified "classic" introspection query, in which the directives applied to the schema elements are exposed. It requires GraphQL server to support this feature. See GraphQL.NET as an example of such a server.

  3. ModernDraft - the same as "modern" + deprecations for input values. This is the most advanced query among all available.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on GraphQL.IntrospectionModel:

Package Downloads
Theauxm.GraphQL.Client

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.22 12,589 12/12/2023
0.0.21 7,176 4/21/2023
0.0.20 1,694 4/21/2023
0.0.19 366 4/21/2023
0.0.18 351 4/21/2023
0.0.17 385 4/14/2023
0.0.16 1,041 12/2/2022
0.0.15 3,697 3/1/2022
0.0.14 1,331 8/2/2021
0.0.13 1,605 4/22/2021
0.0.12 552 4/20/2021
0.0.11 551 4/15/2021
0.0.10 640 3/24/2021
0.0.9 968 10/25/2020
0.0.7 643 10/25/2020
0.0.5 661 9/10/2020
0.0.4 755 7/6/2020
0.0.3 750 2/4/2020
0.0.2 755 12/9/2019
0.0.1 731 12/9/2019