-
- Downloads
Add `present_using` to types
By specifying a presenter for the object type, we can keep the logic out of `GitlabSchema`. The presenter gets initialized using the object being presented, and the context (including the `current_user`).
Showing
- app/graphql/gitlab_schema.rb 2 additions, 1 deletionapp/graphql/gitlab_schema.rb
- app/graphql/types/merge_request_type.rb 26 additions, 30 deletionsapp/graphql/types/merge_request_type.rb
- app/graphql/types/project_type.rb 1 addition, 0 deletionsapp/graphql/types/project_type.rb
- app/presenters/merge_request_presenter.rb 19 additions, 0 deletionsapp/presenters/merge_request_presenter.rb
- changelogs/unreleased/bvl-graphql-start-34754.yml 5 additions, 0 deletionschangelogs/unreleased/bvl-graphql-start-34754.yml
- doc/api/graphql/index.md 34 additions, 0 deletionsdoc/api/graphql/index.md
- doc/development/README.md 2 additions, 0 deletionsdoc/development/README.md
- doc/development/api_graphql_styleguide.md 66 additions, 0 deletionsdoc/development/api_graphql_styleguide.md
- lib/gitlab/graphql/present.rb 34 additions, 0 deletionslib/gitlab/graphql/present.rb
- spec/graphql/gitlab_schema_spec.rb 7 additions, 0 deletionsspec/graphql/gitlab_schema_spec.rb
- spec/requests/graphql/merge_request_query_spec.rb 24 additions, 0 deletionsspec/requests/graphql/merge_request_query_spec.rb
- spec/requests/graphql/project_query_spec.rb 23 additions, 0 deletionsspec/requests/graphql/project_query_spec.rb
- spec/support/helpers/graphql_helpers.rb 31 additions, 2 deletionsspec/support/helpers/graphql_helpers.rb
- spec/support/shared_examples/requests/graphql_shared_examples.rb 18 additions, 0 deletions...pport/shared_examples/requests/graphql_shared_examples.rb
doc/api/graphql/index.md
0 → 100644
doc/development/api_graphql_styleguide.md
0 → 100644
lib/gitlab/graphql/present.rb
0 → 100644
spec/requests/graphql/project_query_spec.rb
0 → 100644
Please register or sign in to comment