Commit Graph

223 Commits

Author SHA1 Message Date
GitLab Bot db4ee69eb3 Add latest changes from gitlab-org/gitlab@master 2020-10-12 03:08:20 +00:00
GitLab Bot cf37ae7acd Add latest changes from gitlab-org/gitlab@master 2020-10-07 12:09:12 +00:00
GitLab Bot 6ab9cdec26 Add latest changes from gitlab-org/gitlab@master 2020-10-06 12:08:38 +00:00
GitLab Bot 2fe341d705 Add latest changes from gitlab-org/gitlab@master 2020-10-05 09:08:17 +00:00
GitLab Bot 895563036a Add latest changes from gitlab-org/gitlab@master 2020-10-02 03:08:28 +00:00
GitLab Bot d57e27ef35 Add latest changes from gitlab-org/gitlab@master 2020-10-01 15:10:05 +00:00
GitLab Bot 635d82b15d Add latest changes from gitlab-org/gitlab@master 2020-10-01 09:09:54 +00:00
GitLab Bot e6bcd6e738 Add latest changes from gitlab-org/gitlab@master 2020-09-25 09:09:40 +00:00
GitLab Bot 7a8d983c19 Add latest changes from gitlab-org/gitlab@master 2020-09-24 09:09:35 +00:00
GitLab Bot dc86d5615e Add latest changes from gitlab-org/gitlab@master 2020-09-18 12:09:50 +00:00
GitLab Bot 6b9b8a52ba Add latest changes from gitlab-org/gitlab@master 2020-09-16 06:09:24 +00:00
GitLab Bot 6b5f961bef Add latest changes from gitlab-org/gitlab@master 2020-09-11 09:08:44 +00:00
GitLab Bot a865379008 Add latest changes from gitlab-org/gitlab@master 2020-09-07 12:08:27 +00:00
GitLab Bot 58b9df24e6 Add latest changes from gitlab-org/gitlab@master 2020-09-05 03:08:31 +00:00
GitLab Bot 4b9ace6c1f Add latest changes from gitlab-org/gitlab@master 2020-09-02 09:10:23 +00:00
GitLab Bot a0b26c6df5 Add latest changes from gitlab-org/gitlab@master 2020-06-29 12:09:20 +00:00
GitLab Bot b7e512c897 Add latest changes from gitlab-org/gitlab@master 2020-06-23 12:09:20 +00:00
GitLab Bot a2dbe2a8d8 Add latest changes from gitlab-org/gitlab@master 2020-06-16 21:08:20 +00:00
GitLab Bot 6478698293 Add latest changes from gitlab-org/gitlab@master 2020-06-09 21:08:21 +00:00
GitLab Bot 3d04746954 Add latest changes from gitlab-org/gitlab@master 2020-06-09 18:08:28 +00:00
GitLab Bot 7258040618 Add latest changes from gitlab-org/gitlab@master 2020-06-09 00:08:47 +00:00
GitLab Bot 908a54b624 Add latest changes from gitlab-org/gitlab@master 2020-06-05 21:08:27 +00:00
GitLab Bot eea1fbf9f9 Add latest changes from gitlab-org/gitlab@master 2020-06-02 15:08:24 +00:00
GitLab Bot a78d7d5c66 Add latest changes from gitlab-org/gitlab@master 2020-05-27 00:08:11 +00:00
GitLab Bot 1cf95147ea Add latest changes from gitlab-org/gitlab@master 2020-05-22 18:08:21 +00:00
GitLab Bot 21539fe9ab Add latest changes from gitlab-org/gitlab@master 2020-05-22 00:08:07 +00:00
GitLab Bot e5731d5194 Add latest changes from gitlab-org/gitlab@master 2020-05-15 09:07:59 +00:00
GitLab Bot a5650b86b5 Add latest changes from gitlab-org/gitlab@master 2020-05-13 21:08:55 +00:00
GitLab Bot c7ba7b9976 Add latest changes from gitlab-org/gitlab@master 2020-05-11 09:09:45 +00:00
GitLab Bot 4279f24a19 Add latest changes from gitlab-org/gitlab@master 2020-05-06 12:09:36 +00:00
GitLab Bot 3795b229ab Add latest changes from gitlab-org/gitlab@master 2020-05-01 00:09:59 +00:00
GitLab Bot e2ee1eec50 Add latest changes from gitlab-org/gitlab@master 2020-04-08 03:09:31 +00:00
GitLab Bot 116d4e56e8 Add latest changes from gitlab-org/gitlab@master 2020-03-26 06:08:40 +00:00
GitLab Bot 0eb4fd2f32 Add latest changes from gitlab-org/gitlab@master 2020-03-19 18:09:17 +00:00
GitLab Bot 77d15aff0e Add latest changes from gitlab-org/gitlab@master 2020-03-19 00:09:27 +00:00
GitLab Bot aaf5961054 Add latest changes from gitlab-org/gitlab@master 2020-03-18 15:09:45 +00:00
GitLab Bot 47ebeef912 Add latest changes from gitlab-org/gitlab@master 2020-03-11 00:09:09 +00:00
GitLab Bot 988b28ec1a Add latest changes from gitlab-org/gitlab@master 2020-03-02 12:07:57 +00:00
GitLab Bot e0fa0638a4 Add latest changes from gitlab-org/gitlab@master 2020-02-27 18:09:21 +00:00
GitLab Bot 211a8c3361 Add latest changes from gitlab-org/gitlab@master 2020-02-07 12:09:13 +00:00
GitLab Bot 27a18afc7d Add latest changes from gitlab-org/gitlab@master 2020-02-04 00:09:04 +00:00
GitLab Bot d0356412df Add latest changes from gitlab-org/gitlab@master 2020-02-01 03:09:04 +00:00
GitLab Bot 6a7005feed Add latest changes from gitlab-org/gitlab@master 2020-01-31 06:08:59 +00:00
GitLab Bot 7cc6872401 Add latest changes from gitlab-org/gitlab@master 2020-01-29 12:09:08 +00:00
GitLab Bot 83a9f472b8 Add latest changes from gitlab-org/gitlab@master 2020-01-24 06:08:51 +00:00
GitLab Bot a5ab3467a7 Add latest changes from gitlab-org/gitlab@master 2020-01-13 15:07:53 +00:00
GitLab Bot afa0ab923d Add latest changes from gitlab-org/gitlab@master 2020-01-09 03:07:56 +00:00
GitLab Bot d203316c80 Add latest changes from gitlab-org/gitlab@master 2020-01-07 21:07:50 +00:00
GitLab Bot d10a462fed Add latest changes from gitlab-org/gitlab@master 2019-12-16 12:07:43 +00:00
GitLab Bot 8cc5f27909 Add latest changes from gitlab-org/gitlab@master 2019-12-13 12:07:41 +00:00
GitLab Bot 17b91a3c6a Add latest changes from gitlab-org/gitlab@master 2019-12-13 09:08:01 +00:00
GitLab Bot 801ced25ff Add latest changes from gitlab-org/gitlab@master 2019-11-25 18:06:04 +00:00
GitLab Bot 8f1f6b374b Add latest changes from gitlab-org/gitlab@master 2019-11-25 12:06:13 +00:00
GitLab Bot 3fc9a8e695 Add latest changes from gitlab-org/gitlab@master 2019-11-15 12:06:12 +00:00
GitLab Bot d8c06be498 Add latest changes from gitlab-org/gitlab@master 2019-11-14 12:06:30 +00:00
GitLab Bot bcdcff7495 Add latest changes from gitlab-org/gitlab@master 2019-11-06 18:06:29 +00:00
Yorick Peterse ad8eea3834
Merge dev.gitlab.org@master into GitLab.com@master 2019-10-30 15:22:45 +01:00
GitLab Bot d64e3a8b28 Add latest changes from gitlab-org/gitlab@master 2019-10-29 12:06:40 +00:00
charlieablett d08a78f4b0 Allow tests to ignore recursion 2019-10-23 15:35:33 +13:00
charlieablett 32cdfb9535 Check for recursion and fail if too recursive
- List all overly-recursive fields
- Reduce recursion threshold to 2
- Add test for not-recursive-enough query
- Use reusable methods in tests
- Add changelog
- Set changeable acceptable recursion level
- Add error check test helpers
2019-10-23 15:35:33 +13:00
GitLab Bot 8e45d25f7d Add latest changes from gitlab-org/gitlab@master 2019-10-16 18:08:01 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Brett Walker ec2b4bb65d Upgrade graphql gem to 1.9.10
- `edge_nodes` needs to get called on the object
- added `include GlobalID::Identification` in a couple places
- renamed `object` to `item` in spec due to conflict
2019-09-04 21:57:37 +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
Brett Walker bdd5b5b695 Replace echo function with a resolver
The `GraphQL::Function` has been deprecated in
favor of resolvers.
2019-08-26 17:43:38 +00:00
Alessio Caiazza 606a1d2d31 Expose namespace storage statistics with GraphQL
Root namespaces have storage statistics.
This commit allows namespace owners to get those stats via GraphQL
queries like the following one

{
  namespace(fullPath: "a_namespace_path") {
    rootStorageStatistics {
      storageSize
      repositorySize
      lfsObjectsSize
      buildArtifactsSize
      packagesSize
      wikiSize
    }
  }
}
2019-08-22 22:08:28 +00:00
Igor 0f46886880 Added submodule links to Submodule type in GraphQL API
This is part of migration of Folder View to Vue
2019-07-17 13:06:19 +00:00
Felipe Artur f0683aab05 Improve Graphql Docs
Adds more friendly docs for GraphQl implementation
2019-07-11 08:06:35 +00:00
charlieablett 675c9b9f6b Address reviewer comments
- Remove Gitaly call check for fields that have a constant complexity
declared
- Add associated test
2019-07-05 10:18:50 +12:00
charlieablett cf1b0d10bc Address reviewer comments
- Add 1 for all fields that call Gitaly (with resolvers or without)
- Clarify comment regarding Gitaly call alert
- Expose predicate `calls_gitaly?` instead of ivar
2019-07-03 22:53:13 +12:00
charlieablett a11fe5de44 Wrap proc properly in gitaly call counts
- Add `calls_gitaly: true` to some fields missing (hey, it works!)
- Clarify proc wrapping
- Add kwargs argument to `mount_mutation`
2019-07-03 22:53:13 +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
Marin Jankovski c20c9e2940
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2019-07-03 11:55:56 +02:00
Marin Jankovski 7eae0e9b52 Merge branch 'security-bvl-enforce-graphql-type-authorization' into 'master'
Fix type authorizations in GraphQL

See merge request gitlab/gitlabhq!3170
2019-07-02 06:22:09 +00:00
Nick Thomas 402255c290 Merge branch '9491-graphql-view-design-board-at-version-ce' into 'master'
CE backport for "Show design boards at previous versions in GraphQL"

See merge request gitlab-org/gitlab-ce!30151
2019-07-01 16:48:49 +00:00
Lin Jen-Shin 2321b337f1 Merge branch 'graphql-tree-last-commit' into 'master'
Added commit type to tree GraphQL type

See merge request gitlab-org/gitlab-ce!29412
2019-06-28 10:02:57 +00:00
Phil Hughes d78f7ceac9
Added commit type to tree GraphQL type 2019-06-28 08:30:29 +01:00
Luke Duncalfe dae02286ba CE backport for changes in EE MR 14292
EE MR https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14292
https://gitlab.com/gitlab-org/gitlab-ee/issues/9491
2019-06-28 17:02:03 +12:00
Luke Duncalfe 4b9b2a43d0 GraphQL mutations for add, remove and toggle emoji
Adding new `AddAwardEmoji`, `RemoveAwardEmoji` and `ToggleAwardEmoji`
GraphQL mutations.

Adding new `#authorized_find_with_pre_checks!` and (unused, but for
completeness `#authorized_find_with_post_checks!`) authorization
methods. These allow us to perform an authorized find, and run our own
additional checks before or after the authorization runs.

https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
2019-06-28 12:03:33 +12:00
Luke Duncalfe bbdcbd98ae Remove unused authorized_find method
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29921#note_184713939
2019-06-26 10:15:14 +12:00
Luke Duncalfe b2a615c3c6 Sanity check for GraphQL authorized?
Raise an exception if a developer calls any of the GraphQL authorization
methods and a `authorize :permission` is missing from a mutation class.

Previously `authorized?` would return `true` in this situation, which
although technically is accurate is not what a developer is intending.
2019-06-26 10:12:35 +12:00
Bob Van Landuyt 967cbd0834 Enforce authorizations for non-nullable fields
This makes sure we also enforce authorizations for non-nullable
fields.

We are defining our authorizations on the unwrapped
types (Repository). But when a type like that is presented in a
non-nullable field, it's type is different (Repository!). The
non-nullable type would not have the authorization metadata.

This makes sure we check the metadata on the unwrapped type for
finding authorizations.
2019-06-21 13:00:50 +02:00
Bob Van Landuyt 406808583c Render GFM html in GraphQL
This adds a `markdown_field` to our types.

Using this helper will render a model's markdown field using the
existing `MarkupHelper` with the context of the GraphQL query
available to the helper.

Having the context available to the helper is needed for redacting
links to resources that the current user is not allowed to see.

Because rendering the HTML can cause queries, the complexity of a
these fields is raised by 5 above the default.

The markdown field helper can be used as follows:

      ```
      markdown_field :note_html, null: false
      ```

This would generate a field that will render the markdown field `note`
of the model. This could be overridden by adding the `method:`
argument. Passing a symbol for the method name:

      ```
      markdown_field :body_html, null: false, method: :note
      ```

It will have this description by default:

> The GitLab Flavored Markdown rendering of `note`

This could be overridden by passing a `description:` argument.

The type of a `markdown_field` is always `GraphQL::STRING_TYPE`.
2019-06-20 08:02:33 +00:00
Bob Van Landuyt c70f7ec77b Rename `BatchCommitLoader` to `BatchLfsOidLoader`
Since we're not actually  loading commits in that loader, but we're
loading blobs with LFS oids in batch and returning only the oids.
2019-06-11 16:11:21 +02:00
Phil Hughes 522c01972c
Add LFS blob ID to GraphQL blob type 2019-06-10 09:05:44 +01:00
Nick Thomas 327c7d5a07 Merge branch 'graphql-file-entry-url' into 'master'
Add web_url to tree entry in GraphQL API

See merge request gitlab-org/gitlab-ce!28646
2019-06-05 15:44:53 +00:00
Phil Hughes 4644a2daf5
Add web_url to tree entry in GraphQL API 2019-06-05 08:46:32 +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
Alessio Caiazza 83a8b77961 Add Namespace and ProjectStatistics to GraphQL API
We can query namespaces, and nested projects.

Projects now exposes statistics
2019-06-03 12:01:32 +02:00
charlie ablett 699532232c Apply reviewer feedback
- Comply doc with guidelines
- Improve tests for readability and completeness
- Separate out phases visually with newlines
- Add `format_message` test
- test readability
- code and test structure/styling
- static query analyzers
- call `as_json` on `provided_variables`
- add exception handling
2019-05-31 19:57:02 +12:00
charlieablett 5f0c230a18 Move complexity/depth to `final_value`
Tidy tests according to reviewer comments.
Move complexity and depth calls from `initial_value` to `final_value`
Log variables as json
2019-05-30 18:27:42 +12:00
charlieablett 184a5120dc Call analyzers from LoggerAnalyzer
- Add changelog file
- Fix failing tests
2019-05-30 18:27:28 +12:00
charlieablett b94a17e00e Add GraphQL logging feature flag 2019-05-30 18:27:28 +12:00
charlieablett 2a10064167 Restructure complexity analyzer
Remove instance variables for class re-use, test individual methods,
use `monotonic_time`
2019-05-30 18:27:28 +12:00
charlieablett 2c011cb5b4 Implement logger analyzer
- Modify GraphqlLogger to subclass JsonLogger
- Replace the single-line analyser with one that can log all the GraphQL
query related information in one place.
- Implement analyzer behavior with spec
2019-05-30 18:27:28 +12:00
charlieablett 1f37aed1c9 New logfile for graphql queries
Specify dedicated logfile and logger class for GraphQL queries. Move
complexity analyzer to a dedicated class.
2019-05-30 18:27:28 +12:00
Jan Provaznik 96750fac4c Add opentracing integration for graphql
Extends existing graphql's tracer with opentracing measurements. Because
it also adds Tracing::Graphql class (for opentracing), it also renames
Graphql::Tracing class to Graphql::GenericTracing to minimize confusion
with similar class names.
2019-05-02 07:01:14 +00:00
Brett Walker eff42d59bd Check for all scalar types 2019-04-22 18:57:45 -05:00
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 a2d044bf97 Merge branch '57831-allow-graphql-scalar-fields-to-be-authorized' into 'master'
Allow GraphQL Scalar-fields to be authorized

Closes #57831

See merge request gitlab-org/gitlab-ce!26338
2019-04-04 17:12:43 +00:00
Rémy Coutable 520c120f7c Merge branch '58405-basic-limiting-complexity-of-graphql-queries' into 'master'
Basic limiting complexity of GraphQL queries

Closes #58405

See merge request gitlab-org/gitlab-ce!26629
2019-04-04 15:39:51 +00:00
Brett Walker 6643b92b88 Use parent object when authorizing scalar types 2019-04-04 09:03:21 -05:00
Jan Provaznik 435d98c9ce Monitor GraphQL with Prometheus
Extends graphql's platform tracing class to observe duration
of graphql methods.

In graphql 1.8.11 is added prometheus class but it's not very useful
for us because it uses prometheus_exporter to export results.
2019-04-04 13:50:31 +00: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
Nick Thomas 7af1ba122f Merge branch '54417-graphql-type-authorization' into 'master'
GraphQL Type authorization

Closes #54417

See merge request gitlab-org/gitlab-ce!25724
2019-04-04 11:38:16 +00:00
Luke Duncalfe 8207f7877f GraphQL Type authorization
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
2019-04-03 14:36:33 +13:00
Jan Provaznik 0c45e268a1 Revert "Merge branch 'jprovazn-graphql-prometheus' into 'master'"
This reverts merge request !26569
2019-04-02 20:05:56 +00:00
Jan Provaznik 0e66357a3e Monitor GraphQL with Prometheus
Extends graphql's platform tracing class to observe duration
of graphql methods.

In graphql 1.8.11 is added prometheus class but it's not very useful
for us because it uses prometheus_exporter to export results.
2019-04-02 10:26:53 +00:00
Luke Duncalfe ccb4edbca1 Improve GraphQL Authorization DSL
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
2019-02-26 10:22:12 +13:00
Lin Jen-Shin 50491d3241 Instead of returning all or nothing, return whichever passed
And add tests
2019-02-14 15:52:17 +08:00
Lin Jen-Shin 564b86a314 Allow authorize on array of objects for GraphQL
And add tests
2019-02-14 15:52:17 +08:00
Phil Hughes 50e21a89a0
Suggests issues when typing title
This suggests possibly related issues when the user types a title.

This uses GraphQL to allow the frontend to request the exact
data that is requires. We also get free caching through the Vue Apollo
plugin.

With this we can include the ability to import .graphql files in JS
and Vue files.
Also we now have the Vue test utils library to make testing
Vue components easier.

Closes #22071
2018-11-27 15:10:40 +00:00
gfyoung ebf98f27c4 Enable even more frozen string in lib/gitlab
Enables frozen string for the following:

* lib/gitlab/fogbugz_import/**/*.rb
* lib/gitlab/gfm/**/*.rb
* lib/gitlab/git/**/*.rb
* lib/gitlab/gitaly_client/**/*.rb
* lib/gitlab/gitlab_import/**/*.rb
* lib/gitlab/google_code_import/**/*.rb
* lib/gitlab/gpg/**/*.rb
* lib/gitlab/grape_logging/**/*.rb
* lib/gitlab/graphql/**/*.rb
* lib/gitlab/graphs/**/*.rb
* lib/gitlab/hashed_storage/**/*.rb
* lib/gitlab/health_checks/**/*.rb

Partially address gitlab-org/gitlab-ce#47424.
2018-11-13 11:42:15 -08:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Jacopo c6bddeacf4 Updates code using class_methods over module ClassMethods 2018-08-29 16:56:34 +02: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 54b56f20b7 Expose permissions on types in GraphQL
This adds a reusable way to expose permissions for a user to types in
GraphQL.
2018-06-28 13:50:17 +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 c443133e77 Handle exceptions outside the GraphQL schema
This allows us to report JSON parse exceptions to clients and ignore
them in sentry.
2018-06-05 20:47:42 +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