Skip to content

How do I change the data access rights correctly? #269

@christoph-maurer

Description

@christoph-maurer

I tried to change the data access rights with

mutation {
  updateDataAccessRights(
    input: {
      allowedUserAndQuantity: { key: "019d1f6f-a7c0-75ad-b42e-f0f8e50d1cba", value: 10 }
      allowedApplications: "019cf712-97c9-7536-bc89-ee5e2d1b73cd"
      allowedInstitutions: "10a186cf-d7ce-465b-a57e-d383b146e1bc"
      dataId: "b231f41d-efa3-48d9-9c46-a2eb22ebb89f"
      dataKind: OPTICAL_DATA
    }
  ) {
    errors {
      code
      message
      path
    }
  }
}

and received

{
  "errors": [
    {
      "message": "Unexpected Execution Error",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "updateDataAccessRights"
      ],
      "extensions": {
        "message": "An error occurred while saving the entity changes. See the inner exception for details.",
        "stackTrace": "   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)\n   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)\n   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)\n   at Database.GraphQl.AccessRights.UpdateDataAccessRightsMutation.UpdateDataAccessRightsAsync(UpdateDataAccessRightsInput input, ApplicationDbContext context, CommonAuthorization authorization, CancellationToken cancellationToken) in /home/me/app/src/GraphQl/AccessRights/UpdateDataAccessRightsMutation.cs:line 95\n   at HotChocolate.Resolvers.Expressions.ExpressionHelper.AwaitTaskHelper[T](Task`1 task)\n   at HotChocolate.Types.Helpers.FieldMiddlewareCompiler.<>c__DisplayClass9_0.<<CreateResolverMiddleware>b__0>d.MoveNext()\n--- End of stack trace from previous location ---\n   at HotChocolate.Execution.Processing.Tasks.ResolverTask.ExecuteResolverPipelineAsync(CancellationToken cancellationToken)\n   at HotChocolate.Execution.Processing.Tasks.ResolverTask.TryExecuteAsync(CancellationToken cancellationToken)"
      }
    }
  ],
  "data": null
}

Metadata

Metadata

Labels

2601Issues for the end of project EQWIN-PISEFraunhofer Institute for Solar Energy Systems ISE

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions