Skip to content

Commit

Permalink
fix some graphql types
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBredl committed May 31, 2024
1 parent ce6c66c commit eb694b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion src/main/resources/graphql/common/directives.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ directive @Positive(message : String = "graphql.validation.Positive.message") on
directive @PositiveOrZero(message : String = "graphql.validation.PositiveOrZero.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
directive @Range(min : Int = 0, max : Int = 2147483647, message : String = "graphql.validation.Range.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
directive @Size(min : Int = 0, max : Int = 2147483647, message : String = "graphql.validation.Size.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
directive @ContainerSize(min : Int = 0, max : Int = 2147483647, message : String = "graphql.validation.ContainerSize.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
directive @ContainerSize(min : Int = 0, max : Int = 2147483647, message : String = "graphql.validation.ContainerSize.message") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION

"""
The @OnDemand directive is used to mark fields that are only internally resolved when requested.
Implementation Note: This will cause the code generator to omit the field from the generated DTOs.
"""
directive @OnDemand on FIELD_DEFINITION
10 changes: 5 additions & 5 deletions src/main/resources/graphql/event.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ interface Event {

type DefaultEvent implements Event {
id: UUID!
eventType: EventType!
eventType: DefaultEventType!
visibility: EventVisibility!
userId: UUID
visibleToUserIds: [UUID!]!
projectId: UUID
timestamp: DateTime!
message: String!
mostRecentChildTimestamp: DateTime!
parent: Event
parent: DefaultEvent
eventData: [DefaultTemplateField!]!
children: [Event!]! @OnDemand
children: [DefaultEvent!]! @OnDemand
}

input CreateEventInput {
Expand All @@ -71,7 +71,7 @@ type DefaultEventType implements EventType {
identifier: String!
description: String
defaultVisibility: EventVisibility!
eventSchema: SchemaDefinition!
eventSchema: DefaultSchemaDefinition!
messageTemplate: String!
}

Expand All @@ -98,7 +98,7 @@ interface SchemaDefinition {
}

type DefaultSchemaDefinition implements SchemaDefinition {
fields: [FieldSchemaDefinition!]!
fields: [DefaultFieldSchemaDefinition!]!
}

interface FieldSchemaDefinition {
Expand Down

0 comments on commit eb694b7

Please sign in to comment.