summaryrefslogtreecommitdiff
path: root/app/graphql/types/merge_request_type.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add task count and completed count to graphql types62910-task-completion-status-gql-pderichsPatrick Derichs2019-06-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Add specs for task completion status (graphql) Fix style issues Changed format of constants in spec Refactor specs to reduce creation of records Reduce parameters to merge request creation Use set's for project and user Move let's out of it_behaves_like block Fix description parameter Fix format of lets Use dig to get task completion status out of graphql response Modified rspec output Add changelog entry
* Fix incorrect instances of `GraphQL::ID_TYPE`Bob Van Landuyt2019-06-031-1/+1
| | | | | | | | | | | Since the `GraphQL::ID_TYPE` usages should represent globally unique ids, this changes some fields for which this is not the case into strings. The `ID_TYPE` is a specialised, so this change should be backwards compatible. https://graphql-ruby.org/type_definitions/scalars.html
* GraphQL Type authorizationLuke Duncalfe2019-04-031-3/+5
| | | | | | | | | | | | | | | | | | | Enables authorizations to be defined on GraphQL Types. module Types class ProjectType < BaseObject authorize :read_project end end If a field has authorizations defined on it, and the return type of the field also has authorizations defined on it. then all of the combined permissions in the authorizations will be checked and must pass. Connection fields are checked by "digging" to find the type class of the "node" field in the expected location of edges->node. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54417
* Improve GraphQL Authorization DSLLuke Duncalfe2019-02-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously GraphQL field authorization happened like this: class ProjectType field :my_field, MyFieldType do authorize :permission end end This change allowed us to authorize like this instead: class ProjectType field :my_field, MyFieldType, authorize: :permission end A new initializer registers the `authorize` metadata keyword on GraphQL Schema Objects and Fields, and we can collect this data within the context of Instrumentation like this: field.metadata[:authorize] The previous functionality of authorize is still being used for mutations, as the #authorize method here is called at during the code that executes during the mutation, rather than when a field resolves. https://gitlab.com/gitlab-org/gitlab-ce/issues/57828
* Add GraphQL filters for issuables (state, labels, time fields)Rémy Coutable2019-02-211-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Removing duplicate field from MergeRequestTypeLuke Duncalfe2019-02-181-1/+0
|
* Allow custom squash commit messagesLuke Duncalfe2019-02-061-1/+2
|
* Enable frozen string in app/graphql + app/findersgfyoung2018-09-111-0/+2
| | | | Partially addresses #47424.
* Add pipeline lists to GraphQLBob Van Landuyt2018-07-041-0/+6
| | | | | | | | | This adds Keyset pagination to GraphQL lists. PoC for that is pipelines on merge requests and projects. When paginating a list, the base-64 encoded id of the ordering field (in most cases the primary key) can be passed in the `before` or `after` GraphQL argument.
* Expose permissions on types in GraphQLBob Van Landuyt2018-06-281-0/+2
| | | | | This adds a reusable way to expose permissions for a user to types in GraphQL.
* Initial setup GraphQL using graphql-ruby 1.8Bob Van Landuyt2018-06-061-43/+44
| | | | | | | | | - All definitions have been replaced by classes: http://graphql-ruby.org/schema/class_based_api.html - Authorization & Presentation have been refactored to work in the class based system - Loaders have been replaced by resolvers - Times are now coersed as ISO 8601
* Add `present_using` to typesBob Van Landuyt2018-06-051-30/+26
| | | | | | | | 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`).
* Add a minimal GraphQL APINick Thomas2018-06-051-0/+50