Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--input-schema-changes-file includes graph queries from files #10

Open
AndreaNassisi opened this issue Oct 21, 2023 · 0 comments
Open
Labels
enhancement New feature or request module: GraphQL changes Changes module, applies changes to the GraphQL schema post generation

Comments

@AndreaNassisi
Copy link
Contributor

The changes json file can include new graphql queries and mutations based on custom graph queries like:

[
    { "type": "Airport", "field": "outboundRoutesCountAdd", "action": "add", "value":"outboundRoutesCountAdd: Int @graphQuery(statement: \"MATCH (this)-[r:route]->(a) RETURN count(r)\")"},  
]

The issue is that the graph query needs to be flattened to a single line. When the graph query has multiple lines, it is difficult to author.

The proposal is to add to the changer statement the option of including a graph query from a file like:

[
    { "type": "Airport", "field": "outboundRoutesCountAdd", "action": "add", "value":"outboundRoutesCountAdd: Int @graphQuery(statement: \"${file(\"<my-query-file-name>\")}\")"},  
]

The file my-query-file-name will include a readable graph query, including CRs

MATCH (this)-[r:route]->(a) 
RETURN count(r)
@AndreaNassisi AndreaNassisi added enhancement New feature or request module: GraphQL changes Changes module, applies changes to the GraphQL schema post generation labels Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module: GraphQL changes Changes module, applies changes to the GraphQL schema post generation
Projects
None yet
Development

No branches or pull requests

1 participant