Using graphcool init --copy <projectId> to make a copy of a legacy project and make it into a framework service, we notice that permission queries are not exported correctly in several ways.
This is a permission query from our legacy project:
For this gc init --copy <projectId> generates the file Role.graphql in the permissions folder, the content of this file is:
The variable $user_id is not a part of the declaration anymore. This seems to happen with all our permission queries only $node_id stays in the declaration.
Apart from this, if a type has more permission queries the generated file in the permissions folder is also not correct in a different way.
For example our Boardtype in our legacy project has two permission queries:
For this gc init --copy <projectId> generates the file Board.graphql in the permissions folder containing the following code:
Notice that the second query (create) has no declaration whatsoever like the delete and because of that the operation: Board.create in graphcool.yml has no reference to create in the query attribute.
Note:
Types with more permission queries trigger this message on a deploy
There are issues with the new service definition:
Global
✖ [Ljava.lang.String;@4621534c (of class [Ljava.lang.String;)
Issue by Melv Tuesday Nov 28, 2017 at 09:19 GMT Originally opened as https://github.com/graphcool/prisma/issues/1338
Current behavior / Reproduction
graphcool/0.9.2 (linux-x64) node-v6.10.2
Using
graphcool init --copy <projectId>
to make a copy of a legacy project and make it into a framework service, we notice that permission queries are not exported correctly in several ways.This is a permission query from our legacy project:
For this
gc init --copy <projectId>
generates the fileRole.graphql
in thepermissions
folder, the content of this file is:The variable
$user_id
is not a part of the declaration anymore. This seems to happen with all our permission queries only$node_id
stays in the declaration.Apart from this, if a type has more permission queries the generated file in the
permissions
folder is also not correct in a different way.For example our
Board
type in our legacy project has two permission queries:For this
gc init --copy <projectId>
generates the fileBoard.graphql
in thepermissions
folder containing the following code:The generated
graphcool.yml
refers to this with the following linesNotice that the second query (
create
) has no declaration whatsoever like thedelete
and because of that theoperation: Board.create
ingraphcool.yml
has no reference tocreate
in thequery
attribute.Note: Types with more permission queries trigger this message on a
deploy
Expected behavior?
valid generation of permission queries