Sdk4me.GraphQL
1.0.7
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Sdk4me.GraphQL --version 1.0.7
NuGet\Install-Package Sdk4me.GraphQL -Version 1.0.7
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.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sdk4me.GraphQL --version 1.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sdk4me.GraphQL, 1.0.7"
#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.0.7
// Install Sdk4me.GraphQL as a Cake Tool
#tool nuget:?package=Sdk4me.GraphQL&version=1.0.7
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.
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})");
Quering
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" }
}, false);
PersonUpdatePayload result = await client.Mutation(new PersonUpdateInput
{
ID = "NG1qLfFhL1blcnNvci8ysjMxSjIx",
PrimaryEmail = "James_Updated@MyCompany.com",
}, true);
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 | 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.
-
net6.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.1 | 34 | 6/15/2024 |
1.3.0 | 110 | 5/4/2024 |
1.2.1 | 143 | 4/6/2024 |
1.2.0 | 185 | 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 |