Skip to content

Commit

Permalink
updates (#3)
Browse files Browse the repository at this point in the history
* Update requirement of package (ChilliCream#4461)

* Fixed mutation convention with ID attribute (ChilliCream#4639)

* Updated BCP preview links

* Updated Banana Cake Pop V22 (ChilliCream#4644)

* Fixed mutation convention runtime type determination (ChilliCream#4645)

* Added banners for blog articles

* Handle if errors prop exsits even if we have an response exception (ChilliCream#3928)

Co-authored-by: Pascal Senn <senn.pasc@gmail.com>

* Hot Chocolate 12.5 Release Blog (ChilliCream#4570)

* Fixed Spelling

* Website Cleanup

* Cleanup tabs (Website)

* Fixed Website Layout

* Integrated Apollo Federation Support in Build (ChilliCream#4650)

* Added SkipIntrospectionFields option on MaxDepthAnalyzer (ChilliCream#4649)

* Fixed Website Build Issues

* Added Security Policy

* Update Security Policy

* Fixed mutation convention for ListType payload (ChilliCream#4653)

* Added CodeQL

* Removed JavaScript from CodeQL

* Use Build Scripts with CodeQL

* Reworked CodeQL Build

* Updated CodeQL to install the dotnet SDK

* Fixed CodeQL dotnet build command.

* Fixed Website Layout Bug

* Website: Added Material UI

* Fixed Website Layout Issues

* Added error limits to the document validation. (ChilliCream#4655)

* New Website Search

* Fixed Badges

* Website Launch Button

* Fixed typo in mutations documentation (ChilliCream#4656)

* Fixed problems with benchmarks and adds reference results (ChilliCream#4659)

* Add note for xml docs + custom naming convention (ChilliCream#4661)

* Fixed ApolloFederation Printer (ChilliCream#4663)

* Refined ID attribute to allow use of IDAttribute also without global ID policy (ChilliCream#4667)

* Update issue templates (ChilliCream#4671)

* Update feature_request.yml

* Update bug_report.yml

Co-authored-by: Jari Pennanen <ciantic@oksidi.com>
Co-authored-by: PascalSenn <senn.pasc@gmail.com>
Co-authored-by: Rafael Staib <rafael@chillicream.com>
Co-authored-by: Michael Staib <michael@chillicream.com>
Co-authored-by: Kim Svensson <61824112+allmightyse@users.noreply.github.com>
Co-authored-by: Aleksey Bogomolov <horse315@gmail.com>
Co-authored-by: Daniel Granerud <86605963+nullableexception@users.noreply.github.com>
Co-authored-by: martetassyns <78635303+martetassyns@users.noreply.github.com>
Co-authored-by: Ben McCallum <ben.mccallum@live.com.au>
  • Loading branch information
10 people authored Jan 21, 2022
1 parent 60d739c commit c944a92
Show file tree
Hide file tree
Showing 673 changed files with 9,996 additions and 3,752 deletions.
2 changes: 1 addition & 1 deletion .build/Build.PublicApiAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
using System.Threading.Tasks;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tools.DotNet;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.Git.GitTasks;
using static Helpers;
using Nuke.Common.ProjectModel;

partial class Build
{
Expand Down
2 changes: 1 addition & 1 deletion .build/Build.Sonar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.SonarScanner;
using static System.IO.Path;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.SonarScanner.SonarScannerTasks;
using static Helpers;
using static System.IO.Path;

partial class Build
{
Expand Down
4 changes: 2 additions & 2 deletions .build/Build.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
Expand All @@ -17,8 +19,6 @@
using static Nuke.Common.Tools.ReportGenerator.ReportGeneratorTasks;
using static Nuke.Common.Tools.Codecov.CodecovTasks;
using static Helpers;
using System;
using System.Diagnostics;

partial class Build
{
Expand Down
1 change: 1 addition & 0 deletions .build/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Helpers
{
"GreenDonut",
Path.Combine("HotChocolate", "Analyzers"),
Path.Combine("HotChocolate", "ApolloFederation"),
Path.Combine("HotChocolate", "AspNetCore"),
Path.Combine("HotChocolate", "AzureFunctions"),
Path.Combine("HotChocolate", "Core"),
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ body:
- Hot Chocolate
- Strawberry Shake
- Banana Cake Pop
- Green Donut
validations:
required: true
- type: input
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ body:
id: product
attributes:
label: Product
description: Which of our products is affected by this bug?
description: Which of our products does this relate to?
options:
- Hot Chocolate
- Strawberry Shake
- Banana Cake Pop
- Green Donut
validations:
required: true
62 changes: 62 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '28 6 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.9.0

- name: Build
run: |
./init.sh
dotnet build ./src/All.sln
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
53 changes: 0 additions & 53 deletions ErrorCodes.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![ChilliCream GraphQL Platform](https://chillicream.com/resources/chillicream-graphql-banner.svg)

[![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/blob/main/LICENSE)
[![License](https://img.shields.io/badge/license-MIT-green)](https://github.com/ChilliCream/hotchocolate/blob/main/LICENSE)
[![Coverage Status](https://sonarcloud.io/api/project_badges/measure?project=HotChocolate&metric=coverage)](https://sonarcloud.io/dashboard?id=HotChocolate)
[![Slack channel](https://img.shields.io/badge/join%20the%20community-on%20slack-blue.svg)](http://slack.chillicream.com/)
[![Twitter](https://img.shields.io/badge/join%20us-on%20twitter-green.svg)](https://twitter.com/chilli_cream)
Expand Down
16 changes: 16 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Security Policy

## Supported Versions

We will provide security updates to the latest major version.

| Version | Supported |
| ------- | ------------------ |
| 12.x | :white_check_mark: |
| < 12.0 | :x: |

## Reporting a Vulnerability

Security issues and bugs should be reported privately, via email, to ChilliCream Inc. by emailing contact@chillicream.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.

Please do not open issues for anything you think might have a security implication.
9 changes: 9 additions & 0 deletions src/HotChocolate/ApolloFederation/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\'))" />

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks Condition="'$(IsMacOsArm)' != 'true'">net6.0; net5.0</TargetFrameworks>
<TargetFrameworks Condition="'$(IsMacOsArm)' == 'true'">net6.0</TargetFrameworks>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>HotChocolate.ApolloFederation</PackageId>
<AssemblyName>HotChocolate.ApolloFederation</AssemblyName>
<RootNamespace>HotChocolate.ApolloFederation</RootNamespace>
<Description></Description>
<LangVersion>preview</LangVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Core\src\Core\HotChocolate.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\FederationResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>FederationResources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\FederationResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>FederationResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>HotChocolate.ApolloFederation</PackageId>
<AssemblyName>HotChocolate.ApolloFederation</AssemblyName>
<RootNamespace>HotChocolate.ApolloFederation</RootNamespace>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Core\src\Core\HotChocolate.Core.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\FederationResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>FederationResources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\FederationResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>FederationResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System.Linq;
using HotChocolate.Language;
using HotChocolate.Types;

namespace HotChocolate.ApolloFederation;

public static partial class FederationSchemaPrinter
{
private static InputObjectTypeDefinitionNode SerializeInputObjectType(
InputObjectType inputObjectType,
ReferencedTypes referenced)
{
var directives = inputObjectType.Directives
.Select(t => SerializeDirective(t, referenced))
.ToList();

var fields = inputObjectType.Fields
.Select(t => SerializeInputField(t, referenced))
.ToList();

return new InputObjectTypeDefinitionNode(
null,
new NameNode(inputObjectType.Name),
SerializeDescription(inputObjectType.Description),
directives,
fields);
}

private static InputValueDefinitionNode SerializeInputField(
IInputField inputValue,
ReferencedTypes referenced)
{
return new InputValueDefinitionNode(
null,
new NameNode(inputValue.Name),
SerializeDescription(inputValue.Description),
SerializeType(inputValue.Type, referenced),
inputValue.DefaultValue,
inputValue.Directives.Select(t => SerializeDirective(t, referenced)).ToList());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
using System.Linq;
using HotChocolate.Language;
using HotChocolate.Types;

namespace HotChocolate.ApolloFederation;

public static partial class FederationSchemaPrinter
{
private static EnumTypeDefinitionNode SerializeEnumType(
EnumType enumType,
ReferencedTypes referenced)
{
var directives = enumType.Directives
.Select(
t => SerializeDirective(
t,
referenced))
.ToList();

var values = enumType.Values
.Select(
t => SerializeEnumValue(
t,
referenced))
.ToList();

return new EnumTypeDefinitionNode(
null,
new NameNode(enumType.Name),
SerializeDescription(enumType.Description),
directives,
values);
}

private static EnumValueDefinitionNode SerializeEnumValue(
IEnumValue enumValue,
ReferencedTypes referenced)
{
var directives = enumValue.Directives
.Select(
t => SerializeDirective(
t,
referenced))
.ToList();

return new EnumValueDefinitionNode(
null,
new NameNode(enumValue.Name),
SerializeDescription(enumValue.Description),
directives
);
}

private static ScalarTypeDefinitionNode SerializeScalarType(
ScalarType scalarType,
ReferencedTypes referenced)
{
var directives = scalarType.Directives
.Select(d => SerializeDirective(d, referenced))
.ToList();

return new(
null,
new NameNode(scalarType.Name),
SerializeDescription(scalarType.Description),
directives);
}
}
Loading

0 comments on commit c944a92

Please sign in to comment.