adamfisher / WaveApps.GraphQLBuilder

A C# GraphQL query builder for waveapps.com.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WaveApps.GraphQLBuilder

Nuget GitHub

A C# GraphQL query builder for waveapps.com. Use this library to build strongly-typed queries in C# that can then be used with a GraphQL client to send commands to the Wave API. This client was code generated against the schema definition and maps 100% of the API operations and models.

Resources

Examples

For more query examples, see the query examples in the Wave developer portal.

List Businesses

A query constructed like this:

var query = new WaveQueryBuilder()
  .WithBusinesses(
      new BusinessConnectionQueryBuilder()
          .WithEdges(new BusinessEdgeQueryBuilder()
              .WithNode(new BusinessQueryBuilder()
                  .WithId()
                  .WithName())))
  .Build();

Will yield the following string from the .Build() method:

query {
  businesses {
    edges {
      node {
        id
        name
      }
    }
  }
}

Get User

Get the currently logged in user:

var query = new WaveQueryBuilder()
  .WithUser(new UserQueryBuilder()
      .WithId()
      .WithFirstName()
      .WithLastName()
      .WithDefaultEmail()
      .WithCreatedAt()
      .WithCreatedAt()
      .WithModifiedAt()
  ).Build();

Will yield the following string from the .Build() method:

query {
  user {
    id
    firstName
    lastName
    defaultEmail
    createdAt
    modifiedAt
  }
}

About

A C# GraphQL query builder for waveapps.com.

License:MIT License


Languages

Language:C# 100.0%