Sdk4me.GraphQL
1.3.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.7.2
This package targets .NET Framework 4.7.2. The package is compatible with this framework or higher.
dotnet add package Sdk4me.GraphQL --version 1.3.0
NuGet\Install-Package Sdk4me.GraphQL -Version 1.3.0
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="Sdk4me.GraphQL" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sdk4me.GraphQL --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sdk4me.GraphQL, 1.3.0"
#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 Sdk4me.GraphQL as a Cake Addin
#addin nuget:?package=Sdk4me.GraphQL&version=1.3.0
// Install Sdk4me.GraphQL as a Cake Tool
#tool nuget:?package=Sdk4me.GraphQL&version=1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
A .NET client for accessing the 4me GraphQL API.
Documentation
More information and documentation can be found on the 4me developer website and on the code4me GitHub repository.
The data entities in the SDK are modeled after the 4me Quality Assurance GraphQL schema, which may include objects or properties that are not yet available in production.
How to use
Minimal example
using Sdk4me.GraphQL;
AuthenticationToken token = new AuthenticationToken("clientID", "clientSecret");
Sdk4meClient client = new(token, "account-name", EnvironmentType.Production, EnvironmentRegion.EU);
Person me = client.Me().Result;
Console.WriteLine($"{me.Name} ({me.PrimaryEmail})");
Querying
PersonQuery query = new PersonQuery()
.View(PersonView.All)
.OrderBy(PersonOrderField.Vip, OrderBySortOrder.Descending)
.Filter(PersonField.CreatedAt, FilterOperator.GreaterThanOrEqualsTo, new DateTime(2020, 1, 1))
.SelectContacts(new ContactQuery()
.Select("*"))
.SelectPermissions(new PermissionQuery()
.ItemsPerRequest(10)
.Select(PermissionField.Account, PermissionField.Roles))
.SelectTeams(new TeamQuery()
.ItemsPerRequest(10)
.SelectMembers(new PersonQuery()
.ItemsPerRequest(50)
.Select(PersonField.Name)))
.SelectConfigurationItems(new ConfigurationItemQuery()
.Select(ConfigurationItemField.Label)
.ItemsPerRequest(10)
.SelectRequests(new RequestQuery()
.ItemsPerRequest(10)
.Select(RequestField.Subject, RequestField.Supplier)));
DataList<Person> people = client.Get(query).Result;
Mutations
PersonCreatePayload result = await client.Mutation(new PersonCreateInput
{
Name = "James",
PrimaryEmail = "James@MyCompany.com",
Disabled = true,
EmployeeID = "123",
TeamIds = new() { "NG1lLnFhL1RlYW0vMjA1MTQ", "NG1lLnFhL1RlYW0vMjA1MGv" },
Source = "Sdk4me",
TimeFormat24h = true,
TimeZone = "Brussels",
DoNotTranslateLanguages = new() { "en", "nl" }
},
new PersonQuery()
.Select(PersonField.ID, PersonField.Account), false);
PersonUpdatePayload result = await client.Mutation(new PersonUpdateInput
{
ID = "NG1qLfFhL1blcnNvci8ysjMxSjIx",
PrimaryEmail = "James_Updated@MyCompany.com",
},
new PersonQuery()
.Select(PersonField.ID, PersonField.PrimaryEmail), true);
Events
RequestEventCreateInput requestCreate = new RequestEventCreateInput()
.Category(RequestCategory.Incident)
.Note("The first note")
.Subject("Sdk4me.GraphQL Test")
.Source("Sdk4me.GraphQL")
.SourceID("1")
.ServiceInstance(416)
.Impact(RequestImpact.Medium)
.ConfigurationItem(1998)
.Team(12);
Request request = await client.CreateEvent(requestCreate);
Related Packages
Feedback
Sdk4me.GraphQL is released as open source under the MIT license. Bug reports are welcome at the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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 is compatible. 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 is compatible. 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.
-
.NETFramework 4.7.2
- Microsoft.Bcl.HashCode (>= 1.1.1)
- Newtonsoft.Json (>= 13.0.3)
- System.Collections.Immutable (>= 8.0.0)
- System.Net.Http (>= 4.3.4)
-
.NETStandard 2.0
- Microsoft.Bcl.HashCode (>= 1.1.1)
- Newtonsoft.Json (>= 13.0.3)
- System.Collections.Immutable (>= 8.0.0)
- System.Net.Http (>= 4.3.4)
-
net6.0
- Newtonsoft.Json (>= 13.0.3)
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
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.3.0 | 98 | 5/4/2024 |
1.2.1 | 135 | 4/6/2024 |
1.2.0 | 177 | 2/3/2024 |
1.1.3 | 93 | 1/21/2024 |
1.1.2 | 183 | 11/28/2023 |
1.1.1 | 131 | 10/27/2023 |
1.1.0 | 129 | 10/15/2023 |
1.0.9 | 129 | 9/19/2023 |
1.0.8 | 246 | 7/23/2023 |
1.0.7 | 318 | 7/10/2023 |
1.0.6 | 152 | 6/25/2023 |
1.0.5 | 209 | 5/21/2023 |
1.0.4 | 163 | 4/10/2023 |
1.0.3 | 199 | 3/21/2023 |
1.0.2 | 242 | 2/19/2023 |
1.0.1 | 257 | 1/28/2023 |
1.0.0 | 317 | 1/26/2023 |