GraphqlToTsql 1.1.1
dotnet add package GraphqlToTsql --version 1.1.1
NuGet\Install-Package GraphqlToTsql -Version 1.1.1
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="GraphqlToTsql" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GraphqlToTsql --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GraphqlToTsql, 1.1.1"
#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 GraphqlToTsql as a Cake Addin #addin nuget:?package=GraphqlToTsql&version=1.1.1 // Install GraphqlToTsql as a Cake Tool #tool nuget:?package=GraphqlToTsql&version=1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GraphqlToTsql is a .NET component that translates GraphQL queries into native T-SQL.
It turns this...
query hammerQuery ($name: String) {
hammer: product (name: $name) {
name
price
orderDetails {
orderId
quantity
order {
date
seller {
city
state
distributor {
name
}
}
}
}
}
}
Into this...
-------------------------------
-- Operation: hammerQuery
-------------------------------
SELECT
-- hammer (t1)
JSON_QUERY ((
SELECT
t1.[Name] AS [name]
, t1.[Price] AS [price]
-- hammer.orderDetails (t2)
, JSON_QUERY ((
SELECT
t2.[OrderId] AS [orderId]
, t2.[Quantity] AS [quantity]
-- hammer.orderDetails.order (t3)
, JSON_QUERY ((
SELECT
t3.[Date] AS [date]
-- hammer.orderDetails.order.seller (t4)
, JSON_QUERY ((
SELECT
t4.[City] AS [city]
, t4.[State] AS [state]
-- hammer.orderDetails.order.seller.distributor (t5)
, JSON_QUERY ((
SELECT
t5.[Name] AS [name]
FROM [Seller] t5
WHERE t4.[DistributorName] = t5.[Name]
FOR JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER)) AS [distributor]
FROM [Seller] t4
WHERE t3.[SellerName] = t4.[Name]
FOR JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER)) AS [seller]
FROM [Order] t3
WHERE t2.[OrderId] = t3.[Id]
FOR JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER)) AS [order]
FROM [OrderDetail] t2
WHERE t1.[Name] = t2.[ProductName]
FOR JSON PATH, INCLUDE_NULL_VALUES)) AS [orderDetails]
FROM [Product] t1
WHERE t1.[Name] = @name
FOR JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER)) AS [hammer]
FOR JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER;
See the project documentation: https://graphqltotsql.net/
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Antlr4.Runtime.Standard (>= 4.8.0)
- Dapper (>= 2.0.78)
- Newtonsoft.Json (>= 12.0.3)
- System.Data.SqlClient (>= 4.8.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
New in version 1.1
* Now you can sort, like this: `{ sellers (orderBy: {city: DESC}) { name } }`