Commit Graph

38 Commits

Author SHA1 Message Date
GitLab Bot 53181fac03 Add latest changes from gitlab-org/gitlab@master 2022-10-19 03:10:36 +00:00
GitLab Bot e4220eecca Add latest changes from gitlab-org/gitlab@master 2022-10-18 18:09:22 +00:00
GitLab Bot b24742b7ed Add latest changes from gitlab-org/gitlab@master 2022-10-17 03:08:57 +00:00
GitLab Bot 68d5cc2d9d Add latest changes from gitlab-org/gitlab@master 2022-06-01 18:09:44 +00:00
GitLab Bot 6a5b78ac69 Add latest changes from gitlab-org/gitlab@master 2021-12-07 03:12:22 +00:00
GitLab Bot 564919dfc6 Add latest changes from gitlab-org/gitlab@master 2021-08-11 09:10:00 +00:00
GitLab Bot 53f7c2edf4 Add latest changes from gitlab-org/gitlab@master 2021-08-09 03:10:10 +00:00
GitLab Bot be8b477154 Add latest changes from gitlab-org/gitlab@master 2021-06-29 03:07:32 +00:00
GitLab Bot c9bef85d79 Add latest changes from gitlab-org/gitlab@master 2021-04-19 21:09:27 +00:00
GitLab Bot 4d16568658 Add latest changes from gitlab-org/gitlab@master 2021-03-18 06:11:52 +00:00
GitLab Bot 7ca4444627 Add latest changes from gitlab-org/gitlab@master 2021-03-11 12:09:28 +00:00
GitLab Bot 8e35232810 Add latest changes from gitlab-org/gitlab@master 2020-09-02 15:10:54 +00:00
GitLab Bot 4f5c8572e9 Add latest changes from gitlab-org/gitlab@master 2020-06-16 18:09:01 +00:00
GitLab Bot 7258040618 Add latest changes from gitlab-org/gitlab@master 2020-06-09 00:08:47 +00:00
GitLab Bot c65a2b8a6c Add latest changes from gitlab-org/gitlab@master 2020-05-18 00:08:13 +00:00
GitLab Bot e2ee1eec50 Add latest changes from gitlab-org/gitlab@master 2020-04-08 03:09:31 +00:00
GitLab Bot 961ecc4cc2 Add latest changes from gitlab-org/gitlab@master 2020-04-04 21:09:33 +00:00
GitLab Bot 0eb4fd2f32 Add latest changes from gitlab-org/gitlab@master 2020-03-19 18:09:17 +00:00
GitLab Bot 5bfb8d1fad Add latest changes from gitlab-org/gitlab@master 2020-03-18 18:09:35 +00:00
GitLab Bot 988b28ec1a Add latest changes from gitlab-org/gitlab@master 2020-03-02 12:07:57 +00:00
GitLab Bot e0b84f4ba4 Add latest changes from gitlab-org/gitlab@master 2020-01-08 21:08:08 +00:00
GitLab Bot d64e3a8b28 Add latest changes from gitlab-org/gitlab@master 2019-10-29 12:06:40 +00:00
Brett Walker aa7b1cfc5b Upgrade GraphQL gem to 1.8.17
- Due to https://github.com/exAspArk/batch-loader/pull/32,
we  changed BatchLoader.for into BatchLoader::GraphQL.for
- since our results are wrapped in a BatchLoader::GraphQL,
calling `sync` during authorization is required to get real object
- `graphql` now has it's own authorization system.  Our
`authorized?` method conflicted and required renaming
2019-09-04 17:42:48 +00:00
Luke Duncalfe 073c8b25ea GraphQL support for Notes created in discussions
A new `discussion_id` argument on the `createNote` mutation allows
people to create a note within that discussion.

The ability to lazy-load Discussions has been added, so
GraphQL.object_from_id can treat Discussions the same as AR objects and
batch load them.

https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
https://gitlab.com/gitlab-org/gitlab-ee/issues/9489
2019-07-10 12:13:48 +12:00
charlieablett f4890d9078 Alert if `calls_gitaly` declaration missing
- Move `calls_gitaly_check` to public
- Add instrumentation for flagging missing CallsGitaly declarations
- Wrap resolver proc in before-and-after Gitaly counts to get the net
Gitaly call count for the resolver.
2019-07-03 22:53:13 +12:00
Phil Hughes d78f7ceac9
Added commit type to tree GraphQL type 2019-06-28 08:30:29 +01:00
Bob Van Landuyt ed503d51a3 Expose IDs in GraphQL as a GlobalID
This exposes all fields named `id` as GlobalIDs so they can be used
across our entire GraphQL implementation.

When the objects loaded are `ApplicationRecord`s. We'll use our
existing batchloading to find them. Otherwise, we'll fall back to the
default implementation of `GlobalID`: Calling the `.find` method on
the class.
2019-06-03 21:59:25 +02:00
Phil Hughes 11f85ae8c3 Enables GraphQL batch requests
Enabling GraphQL batch requests allows for multiple queries
to be sent in 1 request reducing the amount of requests
we send to the server.

Responses come come back in the same order as the queries were
provided.
2019-05-28 10:22:02 +02:00
Ken Ding f80f68d520 58404 - setup max depth for graphql
58404 - add change log


58404 - add spec


58404 - add more spec to test depth 2


58404 - fix spec


58404 - fix rubocop


58404 - refactor the code by Bob's advice


58404 - revert changes of all_graphql_fields_for


58404 - change text only


58404 - fix rspec according to gitlab's standard


58404 - revert previous spec


58404 - fix rubocop
2019-05-07 00:32:29 +09:30
Bob Van Landuyt eca8e6f09b Only check abilities on rendered GraphQL nodes
With this we only check abilities on the rendered edges of a GraphQL
connection instead of all the nodes in it.
2019-04-18 16:17:29 +02:00
Nick Thomas beeeede2ee
Fix a KeyError in GitlabSchema 2019-04-04 18:57:34 +01:00
Brett Walker f458c56107 Initial field and query complexity limits
It makes all Types::BaseField default to a complexity of 1.

Queries themselves now have limited complexity, scaled
to the type of user: no user, authenticated user, or an
admin user.
2019-04-04 08:39:30 -05:00
Bob Van Landuyt 3bcb04f100 Add mutation toggling WIP state of merge requests
This is mainly the setup of mutations for GraphQL. Including
authorization and basic return type-structure.
2018-07-25 18:37:12 +02:00
Bob Van Landuyt 04b046587f Add pipeline lists to GraphQL
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.
2018-07-04 10:53:39 +02:00
Bob Van Landuyt 9b65d4bb41 Initial setup GraphQL using graphql-ruby 1.8
- 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
2018-06-06 10:58:54 +02:00
Bob Van Landuyt aa4b1ae712 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`).
2018-06-05 20:47:42 +02:00
Nick Thomas 287c34ca1f Convert from GraphQL::Batch to BatchLoader 2018-06-05 20:47:42 +02:00
Nick Thomas 9c6c17cbcd Add a minimal GraphQL API 2018-06-05 20:47:42 +02:00