From 7592fe29beb5f4e5a8414801ebf94427b39e49cb Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 22 Apr 2025 15:28:01 +0200 Subject: [PATCH] move graphql types into graphql folder (#8420) --- backend/scripts/build.copy.files.sh | 16 ++++++++-------- .../types/enum/EmailNotificationSettingsName.gql | 0 .../types/enum/EmailNotificationSettingsType.gql | 0 .../{schema => graphql}/types/enum/Emotion.gql | 0 .../types/enum/GroupActionRadius.gql | 0 .../types/enum/GroupMemberRole.gql | 0 .../{schema => graphql}/types/enum/GroupType.gql | 0 .../types/enum/OnlineStatus.gql | 0 .../{schema => graphql}/types/enum/PostType.gql | 0 backend/src/graphql/types/enum/ShoutTypeEnum.gql | 3 +++ .../{schema => graphql}/types/enum/UserRole.gql | 0 .../types/enum/Visibility.gql | 0 backend/src/{schema => graphql}/types/index.ts | 0 .../{schema => graphql}/types/scalar/Upload.gql | 0 .../src/{schema => graphql}/types/type/Badge.gql | 0 .../{schema => graphql}/types/type/Category.gql | 0 .../{schema => graphql}/types/type/Comment.gql | 0 .../{schema => graphql}/types/type/Donations.gql | 0 .../{schema => graphql}/types/type/EMOTED.gql | 0 .../types/type/EmailAddress.gql | 0 .../embed.gql => graphql/types/type/Embed.gql} | 0 .../src/{schema => graphql}/types/type/FILED.gql | 0 .../src/{schema => graphql}/types/type/Group.gql | 0 .../src/{schema => graphql}/types/type/Image.gql | 0 .../types/type/InviteCode.gql | 0 .../{schema => graphql}/types/type/Location.gql | 0 .../{schema => graphql}/types/type/MEMBER_OF.gql | 0 .../{schema => graphql}/types/type/Message.gql | 0 .../{schema => graphql}/types/type/NOTIFIED.gql | 0 .../src/{schema => graphql}/types/type/Post.gql | 0 .../{schema => graphql}/types/type/REVIEWED.gql | 0 .../{schema => graphql}/types/type/Report.gql | 0 .../types/type/Reward.gql.unused} | 9 --------- .../src/{schema => graphql}/types/type/Room.gql | 0 .../{schema => graphql}/types/type/Search.gql | 0 .../types/type/SharedInboxEndpoint.gql.old | 4 ++++ .../types/type/SocialMedia.gql | 0 .../types/type/Statistics.gql | 0 .../src/{schema => graphql}/types/type/Tag.gql | 0 .../src/{schema => graphql}/types/type/User.gql | 0 .../{schema => graphql}/types/type/UserData.gql | 0 backend/src/schema/index.ts | 3 ++- 42 files changed, 17 insertions(+), 18 deletions(-) rename backend/src/{schema => graphql}/types/enum/EmailNotificationSettingsName.gql (100%) rename backend/src/{schema => graphql}/types/enum/EmailNotificationSettingsType.gql (100%) rename backend/src/{schema => graphql}/types/enum/Emotion.gql (100%) rename backend/src/{schema => graphql}/types/enum/GroupActionRadius.gql (100%) rename backend/src/{schema => graphql}/types/enum/GroupMemberRole.gql (100%) rename backend/src/{schema => graphql}/types/enum/GroupType.gql (100%) rename backend/src/{schema => graphql}/types/enum/OnlineStatus.gql (100%) rename backend/src/{schema => graphql}/types/enum/PostType.gql (100%) create mode 100644 backend/src/graphql/types/enum/ShoutTypeEnum.gql rename backend/src/{schema => graphql}/types/enum/UserRole.gql (100%) rename backend/src/{schema => graphql}/types/enum/Visibility.gql (100%) rename backend/src/{schema => graphql}/types/index.ts (100%) rename backend/src/{schema => graphql}/types/scalar/Upload.gql (100%) rename backend/src/{schema => graphql}/types/type/Badge.gql (100%) rename backend/src/{schema => graphql}/types/type/Category.gql (100%) rename backend/src/{schema => graphql}/types/type/Comment.gql (100%) rename backend/src/{schema => graphql}/types/type/Donations.gql (100%) rename backend/src/{schema => graphql}/types/type/EMOTED.gql (100%) rename backend/src/{schema => graphql}/types/type/EmailAddress.gql (100%) rename backend/src/{schema/types/embed.gql => graphql/types/type/Embed.gql} (100%) rename backend/src/{schema => graphql}/types/type/FILED.gql (100%) rename backend/src/{schema => graphql}/types/type/Group.gql (100%) rename backend/src/{schema => graphql}/types/type/Image.gql (100%) rename backend/src/{schema => graphql}/types/type/InviteCode.gql (100%) rename backend/src/{schema => graphql}/types/type/Location.gql (100%) rename backend/src/{schema => graphql}/types/type/MEMBER_OF.gql (100%) rename backend/src/{schema => graphql}/types/type/Message.gql (100%) rename backend/src/{schema => graphql}/types/type/NOTIFIED.gql (100%) rename backend/src/{schema => graphql}/types/type/Post.gql (100%) rename backend/src/{schema => graphql}/types/type/REVIEWED.gql (100%) rename backend/src/{schema => graphql}/types/type/Report.gql (100%) rename backend/src/{schema/types/schema.gql => graphql/types/type/Reward.gql.unused} (68%) rename backend/src/{schema => graphql}/types/type/Room.gql (100%) rename backend/src/{schema => graphql}/types/type/Search.gql (100%) create mode 100644 backend/src/graphql/types/type/SharedInboxEndpoint.gql.old rename backend/src/{schema => graphql}/types/type/SocialMedia.gql (100%) rename backend/src/{schema => graphql}/types/type/Statistics.gql (100%) rename backend/src/{schema => graphql}/types/type/Tag.gql (100%) rename backend/src/{schema => graphql}/types/type/User.gql (100%) rename backend/src/{schema => graphql}/types/type/UserData.gql (100%) diff --git a/backend/scripts/build.copy.files.sh b/backend/scripts/build.copy.files.sh index da76a623c..7279291d6 100755 --- a/backend/scripts/build.copy.files.sh +++ b/backend/scripts/build.copy.files.sh @@ -14,14 +14,14 @@ mkdir -p build/src/middleware/helpers/email/templates/de/ cp -r src/middleware/helpers/email/templates/de/*.html build/src/middleware/helpers/email/templates/de/ # gql files -mkdir -p build/src/schema/types/ -cp -r src/schema/types/*.gql build/src/schema/types/ +mkdir -p build/src/graphql/types/ +cp -r src/graphql/types/*.gql build/src/graphql/types/ -mkdir -p build/src/schema/types/enum/ -cp -r src/schema/types/enum/*.gql build/src/schema/types/enum/ +mkdir -p build/src/graphql/types/enum/ +cp -r src/graphql/types/enum/*.gql build/src/graphql/types/enum/ -mkdir -p build/src/schema/types/scalar/ -cp -r src/schema/types/scalar/*.gql build/src/schema/types/scalar/ +mkdir -p build/src/graphql/types/scalar/ +cp -r src/graphql/types/scalar/*.gql build/src/graphql/types/scalar/ -mkdir -p build/src/schema/types/type/ -cp -r src/schema/types/type/*.gql build/src/schema/types/type/ \ No newline at end of file +mkdir -p build/src/graphql/types/type/ +cp -r src/graphql/types/type/*.gql build/src/graphql/types/type/ \ No newline at end of file diff --git a/backend/src/schema/types/enum/EmailNotificationSettingsName.gql b/backend/src/graphql/types/enum/EmailNotificationSettingsName.gql similarity index 100% rename from backend/src/schema/types/enum/EmailNotificationSettingsName.gql rename to backend/src/graphql/types/enum/EmailNotificationSettingsName.gql diff --git a/backend/src/schema/types/enum/EmailNotificationSettingsType.gql b/backend/src/graphql/types/enum/EmailNotificationSettingsType.gql similarity index 100% rename from backend/src/schema/types/enum/EmailNotificationSettingsType.gql rename to backend/src/graphql/types/enum/EmailNotificationSettingsType.gql diff --git a/backend/src/schema/types/enum/Emotion.gql b/backend/src/graphql/types/enum/Emotion.gql similarity index 100% rename from backend/src/schema/types/enum/Emotion.gql rename to backend/src/graphql/types/enum/Emotion.gql diff --git a/backend/src/schema/types/enum/GroupActionRadius.gql b/backend/src/graphql/types/enum/GroupActionRadius.gql similarity index 100% rename from backend/src/schema/types/enum/GroupActionRadius.gql rename to backend/src/graphql/types/enum/GroupActionRadius.gql diff --git a/backend/src/schema/types/enum/GroupMemberRole.gql b/backend/src/graphql/types/enum/GroupMemberRole.gql similarity index 100% rename from backend/src/schema/types/enum/GroupMemberRole.gql rename to backend/src/graphql/types/enum/GroupMemberRole.gql diff --git a/backend/src/schema/types/enum/GroupType.gql b/backend/src/graphql/types/enum/GroupType.gql similarity index 100% rename from backend/src/schema/types/enum/GroupType.gql rename to backend/src/graphql/types/enum/GroupType.gql diff --git a/backend/src/schema/types/enum/OnlineStatus.gql b/backend/src/graphql/types/enum/OnlineStatus.gql similarity index 100% rename from backend/src/schema/types/enum/OnlineStatus.gql rename to backend/src/graphql/types/enum/OnlineStatus.gql diff --git a/backend/src/schema/types/enum/PostType.gql b/backend/src/graphql/types/enum/PostType.gql similarity index 100% rename from backend/src/schema/types/enum/PostType.gql rename to backend/src/graphql/types/enum/PostType.gql diff --git a/backend/src/graphql/types/enum/ShoutTypeEnum.gql b/backend/src/graphql/types/enum/ShoutTypeEnum.gql new file mode 100644 index 000000000..87fcbc5ff --- /dev/null +++ b/backend/src/graphql/types/enum/ShoutTypeEnum.gql @@ -0,0 +1,3 @@ +enum ShoutTypeEnum { + Post +} \ No newline at end of file diff --git a/backend/src/schema/types/enum/UserRole.gql b/backend/src/graphql/types/enum/UserRole.gql similarity index 100% rename from backend/src/schema/types/enum/UserRole.gql rename to backend/src/graphql/types/enum/UserRole.gql diff --git a/backend/src/schema/types/enum/Visibility.gql b/backend/src/graphql/types/enum/Visibility.gql similarity index 100% rename from backend/src/schema/types/enum/Visibility.gql rename to backend/src/graphql/types/enum/Visibility.gql diff --git a/backend/src/schema/types/index.ts b/backend/src/graphql/types/index.ts similarity index 100% rename from backend/src/schema/types/index.ts rename to backend/src/graphql/types/index.ts diff --git a/backend/src/schema/types/scalar/Upload.gql b/backend/src/graphql/types/scalar/Upload.gql similarity index 100% rename from backend/src/schema/types/scalar/Upload.gql rename to backend/src/graphql/types/scalar/Upload.gql diff --git a/backend/src/schema/types/type/Badge.gql b/backend/src/graphql/types/type/Badge.gql similarity index 100% rename from backend/src/schema/types/type/Badge.gql rename to backend/src/graphql/types/type/Badge.gql diff --git a/backend/src/schema/types/type/Category.gql b/backend/src/graphql/types/type/Category.gql similarity index 100% rename from backend/src/schema/types/type/Category.gql rename to backend/src/graphql/types/type/Category.gql diff --git a/backend/src/schema/types/type/Comment.gql b/backend/src/graphql/types/type/Comment.gql similarity index 100% rename from backend/src/schema/types/type/Comment.gql rename to backend/src/graphql/types/type/Comment.gql diff --git a/backend/src/schema/types/type/Donations.gql b/backend/src/graphql/types/type/Donations.gql similarity index 100% rename from backend/src/schema/types/type/Donations.gql rename to backend/src/graphql/types/type/Donations.gql diff --git a/backend/src/schema/types/type/EMOTED.gql b/backend/src/graphql/types/type/EMOTED.gql similarity index 100% rename from backend/src/schema/types/type/EMOTED.gql rename to backend/src/graphql/types/type/EMOTED.gql diff --git a/backend/src/schema/types/type/EmailAddress.gql b/backend/src/graphql/types/type/EmailAddress.gql similarity index 100% rename from backend/src/schema/types/type/EmailAddress.gql rename to backend/src/graphql/types/type/EmailAddress.gql diff --git a/backend/src/schema/types/embed.gql b/backend/src/graphql/types/type/Embed.gql similarity index 100% rename from backend/src/schema/types/embed.gql rename to backend/src/graphql/types/type/Embed.gql diff --git a/backend/src/schema/types/type/FILED.gql b/backend/src/graphql/types/type/FILED.gql similarity index 100% rename from backend/src/schema/types/type/FILED.gql rename to backend/src/graphql/types/type/FILED.gql diff --git a/backend/src/schema/types/type/Group.gql b/backend/src/graphql/types/type/Group.gql similarity index 100% rename from backend/src/schema/types/type/Group.gql rename to backend/src/graphql/types/type/Group.gql diff --git a/backend/src/schema/types/type/Image.gql b/backend/src/graphql/types/type/Image.gql similarity index 100% rename from backend/src/schema/types/type/Image.gql rename to backend/src/graphql/types/type/Image.gql diff --git a/backend/src/schema/types/type/InviteCode.gql b/backend/src/graphql/types/type/InviteCode.gql similarity index 100% rename from backend/src/schema/types/type/InviteCode.gql rename to backend/src/graphql/types/type/InviteCode.gql diff --git a/backend/src/schema/types/type/Location.gql b/backend/src/graphql/types/type/Location.gql similarity index 100% rename from backend/src/schema/types/type/Location.gql rename to backend/src/graphql/types/type/Location.gql diff --git a/backend/src/schema/types/type/MEMBER_OF.gql b/backend/src/graphql/types/type/MEMBER_OF.gql similarity index 100% rename from backend/src/schema/types/type/MEMBER_OF.gql rename to backend/src/graphql/types/type/MEMBER_OF.gql diff --git a/backend/src/schema/types/type/Message.gql b/backend/src/graphql/types/type/Message.gql similarity index 100% rename from backend/src/schema/types/type/Message.gql rename to backend/src/graphql/types/type/Message.gql diff --git a/backend/src/schema/types/type/NOTIFIED.gql b/backend/src/graphql/types/type/NOTIFIED.gql similarity index 100% rename from backend/src/schema/types/type/NOTIFIED.gql rename to backend/src/graphql/types/type/NOTIFIED.gql diff --git a/backend/src/schema/types/type/Post.gql b/backend/src/graphql/types/type/Post.gql similarity index 100% rename from backend/src/schema/types/type/Post.gql rename to backend/src/graphql/types/type/Post.gql diff --git a/backend/src/schema/types/type/REVIEWED.gql b/backend/src/graphql/types/type/REVIEWED.gql similarity index 100% rename from backend/src/schema/types/type/REVIEWED.gql rename to backend/src/graphql/types/type/REVIEWED.gql diff --git a/backend/src/schema/types/type/Report.gql b/backend/src/graphql/types/type/Report.gql similarity index 100% rename from backend/src/schema/types/type/Report.gql rename to backend/src/graphql/types/type/Report.gql diff --git a/backend/src/schema/types/schema.gql b/backend/src/graphql/types/type/Reward.gql.unused similarity index 68% rename from backend/src/schema/types/schema.gql rename to backend/src/graphql/types/type/Reward.gql.unused index 9e2d00bca..6691b34f1 100644 --- a/backend/src/schema/types/schema.gql +++ b/backend/src/graphql/types/type/Reward.gql.unused @@ -1,16 +1,7 @@ -enum ShoutTypeEnum { - Post -} - type Reward { id: ID! user: User @relation(name: "REWARDED", direction: "IN") rewarderId: ID createdAt: String badge: Badge @relation(name: "REWARDED", direction: "OUT") -} - -type SharedInboxEndpoint { - id: ID! - uri: String } \ No newline at end of file diff --git a/backend/src/schema/types/type/Room.gql b/backend/src/graphql/types/type/Room.gql similarity index 100% rename from backend/src/schema/types/type/Room.gql rename to backend/src/graphql/types/type/Room.gql diff --git a/backend/src/schema/types/type/Search.gql b/backend/src/graphql/types/type/Search.gql similarity index 100% rename from backend/src/schema/types/type/Search.gql rename to backend/src/graphql/types/type/Search.gql diff --git a/backend/src/graphql/types/type/SharedInboxEndpoint.gql.old b/backend/src/graphql/types/type/SharedInboxEndpoint.gql.old new file mode 100644 index 000000000..b078af63b --- /dev/null +++ b/backend/src/graphql/types/type/SharedInboxEndpoint.gql.old @@ -0,0 +1,4 @@ +type SharedInboxEndpoint { + id: ID! + uri: String +} \ No newline at end of file diff --git a/backend/src/schema/types/type/SocialMedia.gql b/backend/src/graphql/types/type/SocialMedia.gql similarity index 100% rename from backend/src/schema/types/type/SocialMedia.gql rename to backend/src/graphql/types/type/SocialMedia.gql diff --git a/backend/src/schema/types/type/Statistics.gql b/backend/src/graphql/types/type/Statistics.gql similarity index 100% rename from backend/src/schema/types/type/Statistics.gql rename to backend/src/graphql/types/type/Statistics.gql diff --git a/backend/src/schema/types/type/Tag.gql b/backend/src/graphql/types/type/Tag.gql similarity index 100% rename from backend/src/schema/types/type/Tag.gql rename to backend/src/graphql/types/type/Tag.gql diff --git a/backend/src/schema/types/type/User.gql b/backend/src/graphql/types/type/User.gql similarity index 100% rename from backend/src/schema/types/type/User.gql rename to backend/src/graphql/types/type/User.gql diff --git a/backend/src/schema/types/type/UserData.gql b/backend/src/graphql/types/type/UserData.gql similarity index 100% rename from backend/src/schema/types/type/UserData.gql rename to backend/src/graphql/types/type/UserData.gql diff --git a/backend/src/schema/index.ts b/backend/src/schema/index.ts index 702b4a001..55eccb4dc 100644 --- a/backend/src/schema/index.ts +++ b/backend/src/schema/index.ts @@ -2,8 +2,9 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import { makeAugmentedSchema } from 'neo4j-graphql-js' +import typeDefs from '@graphql/types/index' + import resolvers from './resolvers' -import typeDefs from './types' export default makeAugmentedSchema({ typeDefs,