![]() |
VOOZH | about |
dotnet add package GraphQL.IntrospectionModel --version 0.0.22
NuGet\Install-Package GraphQL.IntrospectionModel -Version 0.0.22
<PackageReference Include="GraphQL.IntrospectionModel" Version="0.0.22" />
<PackageVersion Include="GraphQL.IntrospectionModel" Version="0.0.22" />Directory.Packages.props
<PackageReference Include="GraphQL.IntrospectionModel" />Project file
paket add GraphQL.IntrospectionModel --version 0.0.22
#r "nuget: GraphQL.IntrospectionModel, 0.0.22"
#:package GraphQL.IntrospectionModel@0.0.22
#addin nuget:?package=GraphQL.IntrospectionModel&version=0.0.22Install as a Cake Addin
#tool nuget:?package=GraphQL.IntrospectionModel&version=0.0.22Install as a Cake Tool
<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>
π 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.
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
GraphQLSchema into SDLGraphQLSchema 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.
This repo provides 4 variations of :
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.
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.
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. |
Showing the top 1 NuGet packages that depend on GraphQL.IntrospectionModel:
| Package | Downloads |
|---|---|
|
Theauxm.GraphQL.Client
Package Description |
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 |