Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates #3

Merged
merged 41 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b66809c
Update requirement of package (#4461)
Ciantic Jan 10, 2022
f117e55
Fixed mutation convention with ID attribute (#4639)
PascalSenn Jan 12, 2022
88468a9
Updated BCP preview links
rstaib Jan 13, 2022
a438e83
Updated Banana Cake Pop V22 (#4644)
michaelstaib Jan 13, 2022
99e4b0e
Fixed mutation convention runtime type determination (#4645)
michaelstaib Jan 13, 2022
649ee26
Added banners for blog articles
rstaib Jan 13, 2022
b5aebd6
Handle if errors prop exsits even if we have an response exception (#…
allmightyse Jan 13, 2022
b997cc3
Hot Chocolate 12.5 Release Blog (#4570)
michaelstaib Jan 13, 2022
484e969
Fixed Spelling
michaelstaib Jan 14, 2022
ffb865b
Website Cleanup
rstaib Jan 15, 2022
eeb6fe5
Cleanup tabs (Website)
rstaib Jan 15, 2022
da45c30
Fixed Website Layout
rstaib Jan 15, 2022
aca8c3e
Integrated Apollo Federation Support in Build (#4650)
michaelstaib Jan 15, 2022
c255a9a
Added SkipIntrospectionFields option on MaxDepthAnalyzer (#4649)
michaelstaib Jan 15, 2022
2174412
Fixed Website Build Issues
rstaib Jan 15, 2022
5d17e46
Merge branch 'main' of github.com:ChilliCream/hotchocolate
rstaib Jan 15, 2022
52918ec
Added Security Policy
michaelstaib Jan 15, 2022
9bc3803
Update Security Policy
michaelstaib Jan 15, 2022
9d253df
Fixed mutation convention for ListType payload (#4653)
horse315 Jan 15, 2022
82b7bad
Added CodeQL
michaelstaib Jan 16, 2022
9f6ec37
Removed JavaScript from CodeQL
michaelstaib Jan 16, 2022
db989a9
Use Build Scripts with CodeQL
michaelstaib Jan 16, 2022
1d2535e
Reworked CodeQL Build
michaelstaib Jan 16, 2022
42dc286
Updated CodeQL to install the dotnet SDK
michaelstaib Jan 16, 2022
16343a5
Fixed CodeQL dotnet build command.
michaelstaib Jan 16, 2022
5dbf2d6
Fixed Website Layout Bug
rstaib Jan 16, 2022
0952ae1
Website: Added Material UI
rstaib Jan 16, 2022
1da4696
Fixed Website Layout Issues
rstaib Jan 16, 2022
e5f3a68
Merge branch 'main' of github.com:ChilliCream/hotchocolate
rstaib Jan 16, 2022
d60ca07
Added error limits to the document validation. (#4655)
michaelstaib Jan 16, 2022
bcf1f35
New Website Search
rstaib Jan 16, 2022
d1c7113
Merge branch 'main' of github.com:ChilliCream/hotchocolate
rstaib Jan 16, 2022
63e1319
Fixed Badges
michaelstaib Jan 16, 2022
ee8a2cc
Website Launch Button
rstaib Jan 16, 2022
ef64576
Merge branch 'main' of github.com:ChilliCream/hotchocolate
rstaib Jan 16, 2022
d199ca7
Fixed typo in mutations documentation (#4656)
nullableexception Jan 17, 2022
f3a4011
Fixed problems with benchmarks and adds reference results (#4659)
martetassyns Jan 18, 2022
7a329be
Add note for xml docs + custom naming convention (#4661)
benmccallum Jan 18, 2022
6192c11
Fixed ApolloFederation Printer (#4663)
michaelstaib Jan 19, 2022
9edff91
Refined ID attribute to allow use of IDAttribute also without global …
michaelstaib Jan 19, 2022
d593f81
Update issue templates (#4671)
benmccallum Jan 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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