Skip to content

Commit

Permalink
chore(server): support appearance in server (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyshx authored Aug 28, 2023
1 parent 2ed816b commit 0876ae2
Show file tree
Hide file tree
Showing 21 changed files with 1,989 additions and 17 deletions.
10 changes: 0 additions & 10 deletions server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -493,16 +493,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/ravilushqa/otelgqlgen v0.8.0 h1:x48k+D1GMgm87xhMO2Lekrr9YGzFbpG3yijn9GpxuAY=
github.com/ravilushqa/otelgqlgen v0.8.0/go.mod h1:6JO5YO2iY4POC7R6yB/L/RKXCcyISL8qQt5NnHOhh0o=
github.com/reearth/reearthx v0.0.0-20230710085115-cea5f6237ccb h1:8ru3dQ4w2eQ09C2F+jG5fNcStdMafEsCpRDpz98ZJu4=
github.com/reearth/reearthx v0.0.0-20230710085115-cea5f6237ccb/go.mod h1:O4zFr6ks8jDKfgy9NBpZKp31jpmAPnfOtMQK9B6xX54=
github.com/reearth/reearthx v0.0.0-20230712023029-a4a80621d9e1 h1:eLjDUZ6Zq+o4uCSb08F8RbwubYKsCA+2dLWFxYyS9+A=
github.com/reearth/reearthx v0.0.0-20230712023029-a4a80621d9e1/go.mod h1:O4zFr6ks8jDKfgy9NBpZKp31jpmAPnfOtMQK9B6xX54=
github.com/reearth/reearthx v0.0.0-20230720090044-7941c97b4cd5 h1:lyVXbsmoxkZ8KPflhMoB7UVeSyrbstcw8myP20wkIZA=
github.com/reearth/reearthx v0.0.0-20230720090044-7941c97b4cd5/go.mod h1:O4zFr6ks8jDKfgy9NBpZKp31jpmAPnfOtMQK9B6xX54=
github.com/reearth/reearthx v0.0.0-20230727162951-2c3dd0165400 h1:/HGxzuKaBf8vZOBDh9zVGzCqu+1tPEQTFHIp1TYTqb4=
github.com/reearth/reearthx v0.0.0-20230727162951-2c3dd0165400/go.mod h1:O4zFr6ks8jDKfgy9NBpZKp31jpmAPnfOtMQK9B6xX54=
github.com/reearth/reearthx v0.0.0-20230728093710-ce02639fb00f h1:8dQdAouhNUqFjY5eRml1m9YXnep1DWM09jW/qvLNszE=
github.com/reearth/reearthx v0.0.0-20230728093710-ce02639fb00f/go.mod h1:O4zFr6ks8jDKfgy9NBpZKp31jpmAPnfOtMQK9B6xX54=
github.com/reearth/reearthx v0.0.0-20230728095451-b9d255b762d5 h1:FUjyN05gB3OeF+CyhUZ5LDrx8TLmjI+b8DueZMtKq2A=
github.com/reearth/reearthx v0.0.0-20230728095451-b9d255b762d5/go.mod h1:O4zFr6ks8jDKfgy9NBpZKp31jpmAPnfOtMQK9B6xX54=
github.com/reearth/reearthx v0.0.0-20230825065409-20e5d57ed3cf h1:84IW4YBa6xjxJml/F/jh51WR6WGlcI6QsRVACi5PhwQ=
Expand Down
1 change: 1 addition & 0 deletions server/gql/_shared.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ scalar Lang
scalar FileSize
scalar TranslatedString
scalar Cursor
scalar JSON

# Meta Type

Expand Down
1 change: 1 addition & 0 deletions server/gql/scene.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type Scene implements Node {
property: Property
rootLayer: LayerGroup
stories: [Story!]!
styles: [Style!]!
datasetSchemas(first: Int, last: Int, after: Cursor, before: Cursor): DatasetSchemaConnection!
tagIds: [ID!]!
tags: [Tag!]!
Expand Down
50 changes: 50 additions & 0 deletions server/gql/style.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
type Style {
id: ID!
name: String!
value: JSON!
}

# InputType

input AddStyleInput {
sceneId: ID!
name: String!
value: JSON!
}

input UpdateStyleInput {
StyleId: ID!
sceneId: ID!
name: String!
value: JSON!
}

input RemoveStyleInput {
StyleId: ID!
sceneId: ID!
}

# Payload

type AddStylePayload {
scene: Scene!
Style: Style!
}

type UpdateStylePayload {
scene: Scene!
Style: Style!
}

type RemoveStylePayload {
scene: Scene!
StyleId: ID!
}

#extend type Query{ }

extend type Mutation {
addStyle(input: AddStyleInput!): AddStylePayload
updateStyle(input: UpdateStyleInput!): UpdateStylePayload
removeStyle(input: RemoveStyleInput!): RemoveStylePayload
}
2 changes: 2 additions & 0 deletions server/gqlgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ models:
model: github.com/reearth/reearth/server/internal/adapter/gql/gqlmodel.Lang
ID:
model: github.com/reearth/reearth/server/internal/adapter/gql/gqlmodel.ID
JSON:
model: github.com/reearth/reearth/server/internal/adapter/gql/gqlmodel.JSON
Asset:
fields:
team:
Expand Down
Loading

0 comments on commit 0876ae2

Please sign in to comment.