Closed be1223 closed 1 year ago
@be1223, checkout the v3.3.3-preview.6.
Now you can control it via --visibility
option:
dotnet zeroql generate -s ./schema.graphql -n TestServer -o ./Generated/GraphQL.g.cs --visibility internal
Also, now it is possible to do it inside the configuration file.
dotnet zeroql config init
dotnet zeroql generate -c ./zeroql.json
The zeroql.json
may look like that:
{
"$schema": "https://raw.githubusercontent.com/byme8/ZeroQL/main/schema.verified.json",
"graphql": "./schema.graphql",
"namespace": "TestServer",
"clientName": "GraphQLClient",
"visibility": "Internal",
"output": "./Generated/GraphQL.g.cs"
}
I'm using ZeroQL generated types in a nuget package which I am mapping to other user-defined types via another Models package.
For this reason I would like to have the ZeroQL generated types be declared as
Internal
so that these types are restricted to the assembly performing the mapping and not publicly exposed.Currently I have to manually change all of the
public
types tointernal
manually and this change is lost each time the tool is run.Perhaps it could be an
--accessibility
flag that's passed to the tool which defaults topublic
for backwards compatibility