Skip to content

Boilerplate Rails project using clean architecture, GraphQL and ROM 4.0

License

Notifications You must be signed in to change notification settings

wmaciejak/rails_rom_graphql_clean_architecture_boilerplate

Repository files navigation

Maintainability

Rails 5 + ROM 4 + GraphQL + Clean Architecture example application

This is a sample app which shows how Rails 5, ROM 4.0, GraphQL and Clean Architecture might work together.

Requirements

  • ruby 2.4.2
  • postgresql 10

What's done already

By libs

By own implementation - feedback is appreciated!

What's to be done

  • Sample use case
  • Mutations
  • Tests
  • Sample pagination
  • Translation from queries Abstract Syntax Tree to Ruby Object Mapper API - the best solution is adapter, but it's a future voice

Known issues

Links

Example Query(can be used in graphiql)

query {
  users{
    username
    email
    posts{
      id
      content
      title
      created_at
      updated_at
      comments {
        id
        content
        created_at
        updated_at
        author_id
        post_id
      }
    }
    comments {
        id
        content
        created_at
        updated_at
        author_id
        post_id
    }
  }
}