summaryrefslogtreecommitdiff
path: root/spec/requests/api/graphql
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@12-6-stable-eeGitLab Bot2019-12-2011-0/+785
|
* Add latest changes from gitlab-org/gitlab@12-5-stable-eeGitLab Bot2019-11-1913-1/+776
|
* Tweak test to insulate against magic number changescharlieablett2019-10-231-0/+1
|
* Check for recursion and fail if too recursivecharlieablett2019-10-231-7/+40
| | | | | | | | | | - 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
* Add latest changes from gitlab-org/gitlab@12-4-stable-eeGitLab Bot2019-10-222-0/+58
|
* Upgrade graphql gem to 1.9.10Brett Walker2019-09-042-2/+11
| | | | | | - `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
* Upgrade GraphQL gem to 1.8.17Brett Walker2019-09-041-1/+1
| | | | | | | | | - 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
* Replace echo function with a resolverBrett Walker2019-08-261-4/+4
| | | | | The `GraphQL::Function` has been deprecated in favor of resolvers.
* Expose namespace storage statistics with GraphQLAlessio Caiazza2019-08-222-1/+56
| | | | | | | | | | | | | | | | | | | 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 } } }
* Use AwardEmojis services in GraphQL mutationsLuke Duncalfe2019-08-212-10/+24
| | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/63372
* Remove code related to object hierarchy in MySQLremove-nested-groups-checksHeinrich Lee Yu2019-07-251-1/+1
| | | | | These are not required because MySQL is not supported anymore
* GraphQL support for Notes created in discussions62826-graphql-note-mutationsLuke Duncalfe2019-07-101-1/+22
| | | | | | | | | | | | 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
* GraphQL mutations for managing NotesLuke Duncalfe2019-07-105-0/+301
| | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
* Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceMarin Jankovski2019-07-034-0/+340
|\
| * Merge branch 'graphql-tree-last-commit' into 'master'Lin Jen-Shin2019-06-281-0/+18
| |\ | | | | | | | | | | | | Added commit type to tree GraphQL type See merge request gitlab-org/gitlab-ce!29412
| | * Added commit type to tree GraphQL typePhil Hughes2019-06-281-0/+18
| | |
| * | GraphQL mutations for add, remove and toggle emoji62826-graphql-emoji-mutationsLuke Duncalfe2019-06-283-0/+322
| |/ | | | | | | | | | | | | | | | | | | | | | | 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
* | Enforce authorizations for non-nullable fieldsBob Van Landuyt2019-06-211-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add authorize to LabelType and NamespaceTypeBob Van Landuyt2019-06-211-3/+1
|/ | | | This also disables the cop with a reasoning in types where appropriate
* Merge branch '62910-task-completion-status-gql-pderichs' into 'master'Sean McGivern2019-06-171-0/+60
|\ | | | | | | | | | | | | Make task completion status available via GraphQL Closes #62910 See merge request gitlab-org/gitlab-ce!29573
| * Add task count and completed count to graphql types62910-task-completion-status-gql-pderichsPatrick Derichs2019-06-151-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Do not blindly expose public project statisticsMayra Cabrera2019-06-141-2/+2
| | | | | | | | Add the missing check on GraphQL API for project statistics
* | Expose comments on Noteables in GraphQLBob Van Landuyt2019-06-142-0/+114
|/ | | | | | | | | This exposes `Note`s on Issues & MergeRequests using a `Types::Notes::NoteableType` in GraphQL. Exposing notes on a new type can be done by implementing the `NoteableType` interface on the type. The presented object should be a `Noteable`.
* 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
* Expose IDs in GraphQL as a GlobalIDBob Van Landuyt2019-06-033-3/+14
| | | | | | | | | | 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.
* Add Namespace and ProjectStatistics to GraphQL APIAlessio Caiazza2019-06-033-4/+130
| | | | | | We can query namespaces, and nested projects. Projects now exposes statistics
* Merge branch '59587-add-graphql-logging' into 'master'Sean McGivern2019-05-311-0/+25
|\ | | | | | | | | | | | | Add logging to GraphQL Closes #59587 See merge request gitlab-org/gitlab-ce!27885
| * Apply reviewer feedback59587-add-graphql-loggingcharlie ablett2019-05-311-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | - 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
| * Call analyzers from LoggerAnalyzercharlieablett2019-05-301-4/+12
| | | | | | | | | | - Add changelog file - Fix failing tests
| * Restructure complexity analyzercharlieablett2019-05-301-1/+1
| | | | | | | | | | Remove instance variables for class re-use, test individual methods, use `monotonic_time`
| * New logfile for graphql queriescharlieablett2019-05-301-0/+10
| | | | | | | | | | Specify dedicated logfile and logger class for GraphQL queries. Move complexity analyzer to a dedicated class.
* | Added spec for authenticating multiplex queriesPhil Hughes2019-05-291-5/+24
|/
* Enables GraphQL batch requestsPhil Hughes2019-05-282-22/+102
| | | | | | | | | 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.
* Added repository files to GraphQL APIPhil Hughes2019-05-222-0/+110
|
* 58404 - setup max depth for graphqlKen Ding2019-05-071-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Refactor group query specBrett Walker2019-04-231-103/+24
| | | | and removing unnecessary code
* Basic GraphQL for a groupBrett Walker2019-04-231-0/+197
| | | | | Add new query for Groups, with new GroupType and NamespaceType
* Merge branch 'bvl-graphql-only-authorize-rendered-fields' into 'master'Lin Jen-Shin2019-04-191-2/+26
|\ | | | | | | | | | | | | Only check abilities on rendered GraphQL nodes Closes #58647 and #60355 See merge request gitlab-org/gitlab-ce!27273
| * Only check abilities on rendered GraphQL nodesBob Van Landuyt2019-04-181-2/+26
| | | | | | | | | | With this we only check abilities on the rendered edges of a GraphQL connection instead of all the nodes in it.
* | Allow arrays to specify fields graphql_query_forbw-query_graphql_field-enhancementBrett Walker2019-04-111-1/+1
|/
* Increase GraphQL complexityBrett Walker2019-04-081-3/+13
| | | | | An IntrospectionQuery required more complexity points.
* Initial field and query complexity limits58405-basic-limiting-complexity-of-graphql-queriesBrett Walker2019-04-041-0/+16
| | | | | | | | 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.
* Add merge request popover with detailsSam Bigelow2019-03-211-2/+2
| | | | | | | | | - Show pipeline status, title, MR Status and project path - Popover attached to gitlab flavored markdown everywhere, including: + MR/Issue Title + MR/Issue description + MR/Issue comments + Rendered markdown files
* Add metadata about the GitLab server to GraphQLNick Thomas2019-03-051-0/+32
|
* Use a block and move setup to example directly56485-implement-graphql-mergerequestsresolverLin Jen-Shin2019-02-141-3/+1
|
* Instead of returning all or nothing, return whichever passedLin Jen-Shin2019-02-141-0/+36
| | | | And add tests
* Suggests issues when typing titlePhil Hughes2018-11-271-0/+59
| | | | | | | | | | | | | | | 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
* Add mutation toggling WIP state of merge requestsBob Van Landuyt2018-07-251-0/+68
| | | | | This is mainly the setup of mutations for GraphQL. Including authorization and basic return type-structure.
* Add pipeline lists to GraphQLBob Van Landuyt2018-07-042-0/+36
| | | | | | | | | 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-282-44/+70
| | | | | This adds a reusable way to expose permissions for a user to types in GraphQL.