You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However as a part of the GraphQL API, I had to create a new, non-activerecord backed model that’s specifically for use within the GraphQL API: They mirror object types within the schema and are used exclusively within the resolvers in one of my types.
I am currently putting them inside app/models but this feels wrong as they don’t have anything to do with the actual app themselves. Part of me thinks that I could maybe get away with creating a models directory in app/graphql.
Is there a convention as to where these “GraphQL models” should be stored?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I’m having a blast creating my GraphQL API within my rails app. The current directory structure is like this:
However as a part of the GraphQL API, I had to create a new, non-activerecord backed model that’s specifically for use within the GraphQL API: They mirror object types within the schema and are used exclusively within the resolvers in one of my types.
I am currently putting them inside
app/models
but this feels wrong as they don’t have anything to do with the actual app themselves. Part of me thinks that I could maybe get away with creating amodels
directory inapp/graphql
.Is there a convention as to where these “GraphQL models” should be stored?
Beta Was this translation helpful? Give feedback.
All reactions