Skip to content

Commit

Permalink
Release Preparations (ChilliCream#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib authored Mar 3, 2019
1 parent 3e54f68 commit 02e7c87
Show file tree
Hide file tree
Showing 91 changed files with 1,511 additions and 78 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

## [0.8.0] - 2019-03-03

### Added

- The stitching layer now batches requests to the remote schemas.
- Introspection schema serializer.
- Introduced auto-stitching capabilities with the new `StitchingBuilder`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![HotChocolate](https://cdn.rawgit.com/ChilliCream/hotchocolate-logo/acacc5b353f4a21bc03591d9910232c3c748d552/img/hotchocolate-banner-light.svg)

[![GitHub release](https://img.shields.io/github/release/chillicream/HotChocolate.svg)](https://github.com/ChilliCream/hotchocolate/releases) [![NuGet Package](https://img.shields.io/nuget/v/hotchocolate.svg)](https://www.nuget.org/packages/HotChocolate/) [![License](https://img.shields.io/github/license/ChilliCream/hotchocolate.svg)](https://github.com/ChilliCream/hotchocolate/releases) [![AppVeyor](https://ci.appveyor.com/api/projects/status/uf8xnbyo32bh7ge1/branch/master?svg=true)](https://ci.appveyor.com/project/rstaib/zeus) [![Travis](https://travis-ci.org/ChilliCream/hotchocolate.svg?branch=master)](https://travis-ci.org/ChilliCream/hotchocolate) [![Tests](https://img.shields.io/appveyor/tests/rstaib/zeus/master.svg)](https://ci.appveyor.com/project/rstaib/zeus) [![Coverage Status](https://sonarcloud.io/api/project_badges/measure?project=HotChocolate&metric=coverage)](https://sonarcloud.io/dashboard?id=HotChocolate) [![Quality](https://sonarcloud.io/api/project_badges/measure?project=HotChocolate&metric=alert_status)](https://sonarcloud.io/dashboard?id=HotChocolate) [![BCH compliance](https://bettercodehub.com/edge/badge/ChilliCream/hotchocolate?branch=master)](https://bettercodehub.com/)
[![GitHub release](https://img.shields.io/github/release/chillicream/HotChocolate.svg)](https://github.com/ChilliCream/hotchocolate/releases) [![NuGet Package](https://img.shields.io/nuget/v/hotchocolate.svg)](https://www.nuget.org/packages/HotChocolate/) [![License](https://img.shields.io/github/license/ChilliCream/hotchocolate.svg)](https://github.com/ChilliCream/hotchocolate/releases) [![AppVeyor](https://ci.appveyor.com/api/projects/status/uf8xnbyo32bh7ge1/branch/master?svg=true)](https://ci.appveyor.com/project/rstaib/zeus) [![Tests](https://img.shields.io/appveyor/tests/rstaib/zeus/master.svg)](https://ci.appveyor.com/project/rstaib/zeus) [![Coverage Status](https://sonarcloud.io/api/project_badges/measure?project=HotChocolate&metric=coverage)](https://sonarcloud.io/dashboard?id=HotChocolate) [![Quality](https://sonarcloud.io/api/project_badges/measure?project=HotChocolate&metric=alert_status)](https://sonarcloud.io/dashboard?id=HotChocolate) [![BCH compliance](https://bettercodehub.com/edge/badge/ChilliCream/hotchocolate?branch=master)](https://bettercodehub.com/)

---

Expand Down
10 changes: 5 additions & 5 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ This document shall give and outlook of what we have planned for the next releas
- [x] FragmentDefinition
- [x] FragmentSpread
- [x] InlineFragment
- [ ] Schema (in development - 0.8.0)
- [ ] Scalar (in development - 0.8.0)
- [ ] Schema (in development - 0.9.0)
- [ ] Scalar (in development - 0.9.0)
- [x] Object
- [x] FieldDefinition
- [ ] ArgumentDefinition
Expand Down Expand Up @@ -87,8 +87,8 @@ We are currently working on the following features that are proposed for the nex

- [x] [Limit directive uniqueness to explicitly marked directives](https://github.com/facebook/graphql/pull/472)
- [x] ["Directive order is significant" section](https://github.com/facebook/graphql/pull/470)
- [ ] [Add rules for how circular references in Input Objects are handled](https://github.com/facebook/graphql/pull/445) (in development - 0.8.0)
- [ ] [Add description to Schema](https://github.com/facebook/graphql/pull/466) (in development - 0.8.0)
- [ ] [Add rules for how circular references in Input Objects are handled](https://github.com/facebook/graphql/pull/445) (in development - 0.9.0)
- [ ] [Add description to Schema](https://github.com/facebook/graphql/pull/466) (in development - 0.9.0)

## Experimental Features

Expand All @@ -108,7 +108,7 @@ We are currently working on the following features that are proposed for the nex
## Additional Directives

- [x] Schema Stitching
- [ ] HTTP Directives (in development - 0.8.0)
- [ ] HTTP Directives (in development - 0.9.0)
- [x] Custom Schema Directives
- [x] Custom Query Directives

Expand Down
165 changes: 164 additions & 1 deletion src/Core/Language.Tests/AST/DirectiveDefinitionNodeTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Snapshooter.Xunit;
using Xunit;

namespace HotChocolate.Language
Expand Down Expand Up @@ -32,6 +34,7 @@ public void CreateDirectiveDefinitionWithLocation(bool isRepeatable)
Assert.Equal(name, directiveDefinition.Name);
Assert.Equal(description, directiveDefinition.Description);
Assert.Equal(isRepeatable, directiveDefinition.IsRepeatable);
Assert.NotEqual(isRepeatable, directiveDefinition.IsUnique);
Assert.Equal(arguments, directiveDefinition.Arguments);
Assert.Equal(locations, directiveDefinition.Locations);
}
Expand All @@ -58,6 +61,166 @@ public void CreateDirectiveDefinition()
Assert.Equal(description, directiveDefinition.Description);
Assert.Equal(arguments, directiveDefinition.Arguments);
Assert.Equal(locations, directiveDefinition.Locations);
Assert.True(directiveDefinition.IsRepeatable);
Assert.False(directiveDefinition.IsUnique);
}

[Fact]
public void WithName()
{
// arrange
var name = new NameNode("foo");
var description = new StringValueNode("bar");
var arguments = new List<InputValueDefinitionNode>();
var locations = new List<NameNode>();

var directiveDefinition = new DirectiveDefinitionNode(
null, name, description, true,
arguments, locations);

// act
directiveDefinition = directiveDefinition
.WithName(new NameNode("bar"));

// assert
directiveDefinition.MatchSnapshot();
}

[Fact]
public void WithDescription()
{
// arrange
var name = new NameNode("foo");
var description = new StringValueNode("bar");
var arguments = new List<InputValueDefinitionNode>();
var locations = new List<NameNode>();

var directiveDefinition = new DirectiveDefinitionNode(
null, name, description, true,
arguments, locations);

// act
directiveDefinition = directiveDefinition
.WithDescription(new StringValueNode("qux"));

// assert
directiveDefinition.MatchSnapshot();
}

[Fact]
public void WithArguments()
{
// arrange
var name = new NameNode("foo");
var description = new StringValueNode("bar");
var arguments = new List<InputValueDefinitionNode>();
var locations = new List<NameNode>();

var directiveDefinition = new DirectiveDefinitionNode(
null, name, description, true,
arguments, locations);

// act
directiveDefinition = directiveDefinition
.WithArguments(new List<InputValueDefinitionNode>
{
new InputValueDefinitionNode
(
null,
new NameNode("arg"),
null,
new NamedTypeNode(new NameNode("type")),
NullValueNode.Default,
Array.Empty<DirectiveNode>()
)
});

// assert
directiveDefinition.MatchSnapshot();
}

[Fact]
public void WithLocations()
{
// arrange
var name = new NameNode("foo");
var description = new StringValueNode("bar");
var arguments = new List<InputValueDefinitionNode>();
var locations = new List<NameNode>();

var directiveDefinition = new DirectiveDefinitionNode(
null, name, description, true,
arguments, locations);

// act
directiveDefinition = directiveDefinition
.WithLocations(new List<NameNode> { new NameNode("BAR") });

// assert
directiveDefinition.MatchSnapshot();
}

[Fact]
public void WithLocation()
{
// arrange
var name = new NameNode("foo");
var description = new StringValueNode("bar");
var arguments = new List<InputValueDefinitionNode>();
var locations = new List<NameNode>();

var directiveDefinition = new DirectiveDefinitionNode(
null, name, description, true,
arguments, locations);

// act
directiveDefinition = directiveDefinition
.WithLocation(AstTestHelper.CreateDummyLocation());

// assert
directiveDefinition.MatchSnapshot();
}

[Fact]
public void AsUnique()
{
// arrange
var name = new NameNode("foo");
var description = new StringValueNode("bar");
var arguments = new List<InputValueDefinitionNode>();
var locations = new List<NameNode>();

var directiveDefinition = new DirectiveDefinitionNode(
null, name, description, true,
arguments, locations);

// act
directiveDefinition = directiveDefinition
.AsUnique();

// assert
directiveDefinition.MatchSnapshot();
}

[Fact]
public void AsRepeatable()
{
// arrange
var name = new NameNode("foo");
var description = new StringValueNode("bar");
var arguments = new List<InputValueDefinitionNode>();
var locations = new List<NameNode>();

var directiveDefinition = new DirectiveDefinitionNode(
null, name, description, false,
arguments, locations);

// act
directiveDefinition = directiveDefinition
.AsRepeatable();

// assert
directiveDefinition.MatchSnapshot();
}
}
}
Loading

0 comments on commit 02e7c87

Please sign in to comment.