Skip to content

Commit

Permalink
Added some comments and reinstalled some packages to match the main r…
Browse files Browse the repository at this point in the history
…epository's package.json
  • Loading branch information
xoldd committed Nov 6, 2022
1 parent 1227bd4 commit 5c01bf9
Show file tree
Hide file tree
Showing 29 changed files with 697 additions and 978 deletions.
44 changes: 24 additions & 20 deletions codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,45 @@
overwrite: true
# address to the graphql type defintions(schema)
schema:
- './src/lib/typeDefs/**/*.ts'
- "./src/lib/typeDefs/**/*.ts"
# Upload scalar is injected by apollo-server into the schema. Graphql-codegen by default generates it's typescript type as 'any'.
- scalar Upload
generates:
# where to emit the generated graphql typescript defintions
./src/generated/graphqlCodegen.ts:
plugins:
# Generates base typescript types from graphql types.
- typescript
# Generates resolver types using base typescript types generated above.
- typescript-resolvers
config:
# Makes the info argument passed to the resolver functions optional
optionalInfoArgument: true
# Makes the resolver function callable
makeResolverTypeCallable: true
# Mappers lets us provide database model types to be used in generated graphql typescript types instead of graphql types.
# This is because graphql types and database model types don't always map 1:1 to each other within a graphql application.
# Mappers lets us provide database model types to be used in generated typescript types instead of graphql types. This
# is because what we retrieve from the database and what we choose to return from a graphql server could be completely
# different fields. This also helps in seperating out resolver logic for nested relation fields into their own resolvers
# instead of resolving them in the root resolver itself.
mappers:
MessageChat: '../lib/models/MessageChat#Interface_MessageChat'
Comment: '../lib/models/Comment#Interface_Comment'
DirectChat: '../lib/models/DirectChat#Interface_DirectChat'
DirectChatMessage: '../lib/models/DirectChatMessage#Interface_DirectChatMessage'
MessageChat: "../lib/models/MessageChat#Interface_MessageChat"
Comment: "../lib/models/Comment#Interface_Comment"
DirectChat: "../lib/models/DirectChat#Interface_DirectChat"
DirectChatMessage: "../lib/models/DirectChatMessage#Interface_DirectChatMessage"
Donation: "../lib/models/Donation#Interface_Donation"
Event: '../lib/models/Event#Interface_Event'
Event: "../lib/models/Event#Interface_Event"
# EventProject: '../lib/models/EventProject#Interface_EventProject'
# File: '../lib/models/File#Interface_File'
Group: '../lib/models/Group#Interface_Group'
GroupChat: '../lib/models/GroupChat#Interface_GroupChat'
GroupChatMessage: '../lib/models/GroupChatMessage#Interface_GroupChatMessage'
Group: "../lib/models/Group#Interface_Group"
GroupChat: "../lib/models/GroupChat#Interface_GroupChat"
GroupChatMessage: "../lib/models/GroupChatMessage#Interface_GroupChatMessage"
# ImageHash: '../lib/models/ImageHash#Interface_ImageHash'
Language: '../lib/models/Language#Interface_Language'
MembershipRequest: '../lib/models/MembershipRequest#Interface_MembershipRequest'
Message: '../lib/models/Message#Interface_Message'
Organization: '../lib/models/Organization#Interface_Organization'
Plugin: '../lib/models/Plugin#Interface_Plugin'
PluginField: '../lib/models/PluginField#Interface_PluginField'
Post: '../lib/models/Post#Interface_Post'
Task: '../lib/models/Task#Interface_Task'
User: '../lib/models/User#Interface_User'
Language: "../lib/models/Language#Interface_Language"
MembershipRequest: "../lib/models/MembershipRequest#Interface_MembershipRequest"
Message: "../lib/models/Message#Interface_Message"
Organization: "../lib/models/Organization#Interface_Organization"
Plugin: "../lib/models/Plugin#Interface_Plugin"
PluginField: "../lib/models/PluginField#Interface_PluginField"
Post: "../lib/models/Post#Interface_Post"
Task: "../lib/models/Task#Interface_Task"
User: "../lib/models/User#Interface_User"
Loading

0 comments on commit 5c01bf9

Please sign in to comment.