-
- Downloads
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.
Showing
- app/graphql/gitlab_schema.rb 25 additions, 0 deletionsapp/graphql/gitlab_schema.rb
- app/graphql/types/base_object.rb 5 additions, 0 deletionsapp/graphql/types/base_object.rb
- changelogs/unreleased/bvl-use-global-ids-graphql.yml 5 additions, 0 deletionschangelogs/unreleased/bvl-use-global-ids-graphql.yml
- doc/development/api_graphql_styleguide.md 18 additions, 3 deletionsdoc/development/api_graphql_styleguide.md
- lib/gitlab/graphql/loaders/batch_model_loader.rb 1 addition, 1 deletionlib/gitlab/graphql/loaders/batch_model_loader.rb
- spec/graphql/features/authorization_spec.rb 1 addition, 1 deletionspec/graphql/features/authorization_spec.rb
- spec/graphql/gitlab_schema_spec.rb 58 additions, 0 deletionsspec/graphql/gitlab_schema_spec.rb
- spec/requests/api/graphql/gitlab_schema_spec.rb 12 additions, 1 deletionspec/requests/api/graphql/gitlab_schema_spec.rb
- spec/requests/api/graphql/group_query_spec.rb 1 addition, 1 deletionspec/requests/api/graphql/group_query_spec.rb
- spec/requests/api/graphql/namespace/projects_spec.rb 1 addition, 1 deletionspec/requests/api/graphql/namespace/projects_spec.rb
Please register or sign in to comment