Skip to content

Commit

Permalink
Improve spell-checking (#7126)
Browse files Browse the repository at this point in the history
  • Loading branch information
glen-84 authored May 27, 2024
1 parent 107da25 commit 16a9e15
Show file tree
Hide file tree
Showing 103 changed files with 324 additions and 6,351 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
run: npm install -g cspell

- name: run cspell
run: cspell --config ./cSpell.json "website/src/**/*.md" --no-progress --no-cache
run: cspell --config ./cspell.json "website/src/**/*.md" --no-progress --no-cache

linting:
name: "Markdown linting"
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"EditorConfig.EditorConfig",
"k--kato.docomment",
"dbaeumer.vscode-eslint",
"josefpihrt-vscode.roslynator"
"josefpihrt-vscode.roslynator",
"streetsidesoftware.code-spell-checker"
]
}
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ There are other available commands too. As set up in the [.build](./.build/) dir

## How to Check the docs

We use [Markdownlint](https://github.com/DavidAnson/markdownlint) to check markdown formatting and [cSpell](https://cspell.org) for spelling. We have GitHub actions to check these for PRs, but if you'd like to check locally, you can:
We use [Markdownlint](https://github.com/DavidAnson/markdownlint) to check markdown formatting and [CSpell](https://cspell.org) for spelling. We have GitHub actions to check these for PRs, but if you'd like to check locally, you can:

- Install cSpell: `npm install -g cspell`
- Install CSpell: `npm install --global cspell`
- Install the markdownlint CLI: `npm install -g markdownlint-cli`.
- For spellcheck, run `cspell --config ./cSpell.json "website/src/**/*.md" --no-progress`
- For spellcheck, run `cspell --config ./cspell.json "website/src/**/*.md" --no-progress`
- For markdown linting, run `markdownlint "./website/src/**/*.md" --disable MD013`

## Code of conduct
Expand Down
107 changes: 0 additions & 107 deletions cSpell.json

This file was deleted.

16 changes: 16 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"language": "en",
"dictionaries": ["csharp", "custom"],
"dictionaryDefinitions": [
{
"name": "custom",
"path": "./dictionary.txt"
}
],
"ignoreRegExpList": [
"featuredVideoId:(.*)", // video hash
"videoId=\"(.*)\"" // video hash
]
}
88 changes: 88 additions & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
Andi
aspnetcore
automagically
autonumber
Badurina
bananacakepop
BCPROCKS
blazor
blazorwasm
BSON
cacheable
CCPA
chillicream
Contoso
CQRS
dataloaders
decompile
enisdenjo
entityframework
FIPS
foos
fricking
Giroux
GraphiQL
graphqlconfig
graphqlrc
graphyne
greendonut
Hasura
hotchocolate
Kellner
Kydne
Linq
Marek
matchesBrics
mercurius
meros
ncontains
nendsWith
NEWHOPE
Newtonsoft
ngte
nintersects
nlte
Noda
Normen
noverlaps
Npgsql
nstartsWith
NSwag
ntouches
nwithin
oneof
OpenIddict
OWIN
pageable
PKCE
Postgraphile
preconfigured
protobuf
quox
quux
Rafi
reencode
relayjs
Rgba
runbooks
Senn
shoooe
Skywalker
snapshooter
Specwise
srid
Staib
starwars
strawberryshake
Structs
sublicensable
supergraph
Swashbuckle
Tengler
unpublish
URQL
vsix
websockets
winget
Wunder
xunit
2 changes: 1 addition & 1 deletion website/src/blog/2018-09-02-hot-chocolate-0.4.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ We now are finished with implementing the query validation rules. The following
- Directives Are Defined [124](https://github.com/ChilliCream/graphql-platform/issues/124)
- Values of Correct Type [120](https://github.com/ChilliCream/graphql-platform/issues/120)

We now also support the `@deprectaed` directive when using schema-first.
We now also support the `@deprecated` directive when using schema-first.

Furthermore, we fixed a lot of bugs around schema-first. So, at the moment code-first is still the most viable way to create a schema,but we are working hard to get both flavours on par.

Expand Down
2 changes: 1 addition & 1 deletion website/src/blog/2019-02-20-schema-stitching.md
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ type UserMutations {
The stitching engine provides a lot of extension points, but if we wanted to write the stitching for one specific resolver by ourselves then we could do that by using the `IStitchingContext` which is a scoped service and can be resolved through the resolver context.

```csharp
IStitchingContext stitchingContext = context.Service<IStichingContext>();
IStitchingContext stitchingContext = context.Service<IStitchingContext>();
IRemoteQueryClient remoteQueryClient = stitchingContext.GetRemoteQueryClient("messages");
IExecutionResult result = remoteQueryClient.ExecuteAsync("{ foo { bar } }")
```
Expand Down
2 changes: 1 addition & 1 deletion website/src/blog/2019-04-11-integration-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ The query executor will return an execution result, depending on the type of ope

An `IReadOnlyQueryResult` contains basically the result graph of the query, but asserting this could be very tiresome.

My good friend [Normen](https://github.com/nscheibe) who works at Swiss Life created a snapshot testing library that basically works like [jestjs](https://jestjs.io). We use _Snapshooter_ internally to test the Hot Chocolate core.
My good friend [Normen](https://github.com/nscheibe) who works at Swiss Life created a snapshot testing library that basically works like [Jest](https://jestjs.io). We use _Snapshooter_ internally to test the Hot Chocolate core.

[Snapshooter](https://github.com/SwissLife-OSS/snapshooter) will create a snapshot at the first execution of the test. The snapshots are saved in a folder `__snapshot__` that is co-located with our test class. Every consecutive test run will be validated against that first snapshot. If the snapshots do not match the test will fail and tell us what part did not match.

Expand Down
10 changes: 5 additions & 5 deletions website/src/blog/2019-04-12-type-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ With our new schema builder, we did a lot of work underneath and introduced the

**For what is that useful?**

For one you can now register our new `INamingConverions` with the dependency injection and then the new `SchemaBuilder` will use your naming conventions instead of the built-in naming conventions.
For one you can now register our new `INamingConventions` with the dependency injection and then the new `SchemaBuilder` will use your naming conventions instead of the built-in naming conventions.

Also, you can register our new `ITypeInspector` and override how we infer schema types from POCOs. This will allow you for instance to add support for custom attributes, so no need to pollute your API with our attributes anymore.

But fear not, you do not have to implement the whole `INamingConverions` interface for instance since you can override each part of our default implementation.
But fear not, you do not have to implement the whole `INamingConventions` interface for instance since you can override each part of our default implementation.

Since, in many cases we just want to tune existing naming conventions we can inherit from the default implementation `DefaultNamingConventions` and overwrite just what we want to change.

Expand Down Expand Up @@ -88,11 +88,11 @@ In order to register our conventions with the schema builder we can do the follo
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<INamingConverions, MyNamingConventions>();
services.AddSingleton<INamingConventions, MyNamingConventions>();
services.AddGraphQL(sp => Schema.Create(c =>
{
c.RegisterServiceProvider(sp);
c.RegisterQuerType<Foo>();
c.RegisterQueryType<Foo>();
}));

}
Expand All @@ -103,7 +103,7 @@ Or we could do it like the following with the new schema builder:
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<INamingConverions, MyNamingConventions>();
services.AddSingleton<INamingConventions, MyNamingConventions>();
services.AddGraphQL(sp => SchemaBuilder.New()
.AddQueryType<Foo>()
.AddServices(sp));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ As we promised in the past, we are adding more documentation with every release.

With this release we have published a first draft of the new documentation and will add missing parts during this week.

## Banana Cakepop
## Banana Cake Pop

When we released Hot Chocolate version 8 we announced a new _Hot Chocolate Developer Tool_. Since that announcement we were heavily at work building that new tool.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ All you have to do in your schema type is to add a `UseFiltering` to your field
public class QueryType
: ObjectType<Query>
{
protected override void Configure(IObjetcTypeDescriptor<Query> descriptor)
protected override void Configure(IObjectTypeDescriptor<Query> descriptor)
{
descriptor.Field(t => t.GetPersons(default))
.Type<ListType<PersonType>>()
Expand All @@ -53,7 +53,7 @@ Filters are easily combined with our pagination.
public class QueryType
: ObjectType<Query>
{
protected override void Configure(IObjetcTypeDescriptor<Query> descriptor)
protected override void Configure(IObjectTypeDescriptor<Query> descriptor)
{
descriptor.Field(t => t.GetPersons(default))
.UsePaging<PersonType>()
Expand All @@ -68,7 +68,7 @@ Also, it is possible to customize filters by describing what fields are filterab
public class QueryType
: ObjectType<Query>
{
protected override void Configure(IObjetcTypeDescriptor<Query> descriptor)
protected override void Configure(IObjectTypeDescriptor<Query> descriptor)
{
descriptor
.Field(t => t.GetPersons(default))
Expand Down Expand Up @@ -104,7 +104,7 @@ And then use this filter type where you need it.
public class QueryType
: ObjectType<Query>
{
protected override void Configure(IObjetcTypeDescriptor<Query> descriptor)
protected override void Configure(IObjectTypeDescriptor<Query> descriptor)
{
descriptor
.Field(t => t.GetPersons(default))
Expand Down Expand Up @@ -344,11 +344,11 @@ Moreover, this one will be the backbone of our new stitching layer that will bri

The second thing we already started work on is a client API for .NET Core. We are currently experimenting with how we design this new piece of API. We have started a discussion around this in our slack channel and will start with some coding soon.

## Banana Cakepop
## Banana Cake Pop

**Oh, didn't you forget something?**

Yes, yes originally, we had planned to release _Banana Cakepop_ alongside this version. We ran into some performance issues with the tree we originally selected when using large schemas with more than 1000 types.
Yes, yes originally, we had planned to release _Banana Cake Pop_ alongside this version. We ran into some performance issues with the tree we originally selected when using large schemas with more than 1000 types.

We have now started to write the tree component ourselves which is taking some extra time. We already see that we can handle now massive schemas far beyond 1000 types without any hiccups. But we have still lots to do on the new tree.

Expand All @@ -360,6 +360,6 @@ We also will add more features to our filter API and make working with databases

Also, we will add more subscription provider like Kafka and EventHub.

Furthermore, we will rework our `Utf8GraphQLReader` to use `ReadOnlySequence<byte>` instead of `ReadOnlySpan<byte>` in order to make this even better work with the Pipeline API. Apart from that we will optimize the syntax tree to be able to work with raw bytes instead of strings. At the moment scalar like String, Int, Float and Enum are parsed as string representation like with the original node parser. The scalar type parses then the string into the native type. The same goes for the new UTF-8 request parser. This is unnecessary with the `Utf8Parser` and `Utf8Formater`. We will change the AST to instead have the raw bytes. The current `Value` property will still be there but only for compatibility with tools that use the current version of the AST. The new scalar types will have access to a `ReadOnlySpan<byte>` and can decide how to efficiently parse literals.
Furthermore, we will rework our `Utf8GraphQLReader` to use `ReadOnlySequence<byte>` instead of `ReadOnlySpan<byte>` in order to make this even better work with the Pipeline API. Apart from that we will optimize the syntax tree to be able to work with raw bytes instead of strings. At the moment scalar like String, Int, Float and Enum are parsed as string representation like with the original node parser. The scalar type parses then the string into the native type. The same goes for the new UTF-8 request parser. This is unnecessary with the `Utf8Parser` and `Utf8Formatter`. We will change the AST to instead have the raw bytes. The current `Value` property will still be there but only for compatibility with tools that use the current version of the AST. The new scalar types will have access to a `ReadOnlySpan<byte>` and can decide how to efficiently parse literals.

If you want to get into contact with us head over to our slack channel and join our community.
4 changes: 2 additions & 2 deletions website/src/blog/2019-11-25-strawberry-shake_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public class ByteArrayValueSerializer

throw new ArgumentException(
"The specified value is of an invalid type. " +
$"{ClrType.FullName} was expeceted.");
$"{ClrType.FullName} was expected.");
}

public override object? Deserialize(object? serialized)
Expand All @@ -495,7 +495,7 @@ public class ByteArrayValueSerializer

throw new ArgumentException(
"The specified value is of an invalid type. " +
$"{SerializationType.FullName} was expeceted.");
$"{SerializationType.FullName} was expected.");
}
}
```
Expand Down
Loading

0 comments on commit 16a9e15

Please sign in to comment.