service class does not exist on installing

Created on 4 November 2024, about 2 months ago

Problem/Motivation

I am getting an error that class doesn't not exists when installing the module via drush. However, it generate dynamic permissions when I create a GraphQL server. So, it only happens on installing via drush.

Class "graphql.permission_provider" does not exist.

Steps to reproduce

  1. Install fresh Drupal 11
  2. Install GraphQL 4 via "drush en graphql"

and you will get the error.

Proposed resolution

It looks like the providing service name in the permission_callbacks doesn't work while installing the module via drush. So, we have to point the callback to the service class instead of service name so that it also works when installing module via drush.

Plus, after fixing above error, there would be another error below:

The "graphql_server" entity type does not exist.

In the "permissions()" callback, the entity is not yet available, so also have to check if it is available.

Remaining tasks

Review, Merge.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇵🇰Pakistan usmanjutt84 Islamabad

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024