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

Cleanup Components and IntegrationTest #105

Merged
merged 42 commits into from
May 17, 2023
Merged

Conversation

RohrerF
Copy link
Member

@RohrerF RohrerF commented May 15, 2023

  • enable TreatWarningsAsErrors
  • values of Component (JSON string in Database)
    • AnyType -> JsonType
    • Dictionary<string, object?> -> JsonElement
  • Component
    • Align Scopes with the way variable scopes work
    • remove duplicated resolvers
    • cleanup schema
    • remove ComponentState
  • Integration Tests for all Component Queries and Mutations

part of #106

using Confix.Common.Exceptions;

namespace Confix.Authoring.GraphQL.Components;

[ExtendObjectType(OperationTypeNames.Mutation)]
public sealed class ComponentMutations
{
[Error(typeof(SchemaInvalidError))]
[Error(typeof(ValueSchemaViolation))]
[Error(typeof(UnauthorizedOperationException))]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we not directly use the Exception here instead of wrapping it in an Error Object? @PascalSenn

@RohrerF RohrerF marked this pull request as ready for review May 15, 2023 16:43
@RohrerF RohrerF requested a review from PascalSenn May 15, 2023 16:46
Copy link
Member

@PascalSenn PascalSenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
I approved but have a look at the comments

IReadOnlyList<ComponentScope> scopes,
IDictionary<string, object?>? values,
JsonElement values,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a JsonDocument would actually be more correct here right?

@RohrerF RohrerF merged commit 8be52f1 into main May 17, 2023
@RohrerF RohrerF deleted the component-integrationtests branch May 17, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants