artemis icon indicating copy to clipboard operation
artemis copied to clipboard

Unable to use `ArtemisClient` in a package without specifying `build.yaml` config

Open CelticMajora opened this issue 3 years ago • 0 comments

Before reporting a bug, please test the beta branch!

Bug description

The project I am working on is a monorepo where our queries, models, etc live in a package separate from our app(lets call that package api). I'm injecting an ArtemisClient into that api package from my app to make queries because I want to be able to setup my own logging, headers, interceptors, etc. within the app, however when trying to run unrelated build_runner generation in the app package, I get the following error message:

[SEVERE] 
Missing `schema_mapping` configuration option. Cehck `build.yaml` configuration
pub finished with exit code 78

I think I'd expect the client to be provided as a separate package as the client feels like a separate responsibility from the code generation.

Specs

Artemis version: '>=7.0.0 <8.0.0'

build.yaml:
# Please paste your `build.yaml` file

I haven't configured artemis in build.yaml as for the app package I only want access to ArtemisClient, not any code generation tools.

Artemis output:
[SEVERE] artemis:artemis:

Missing `schema_mapping` configuration option. Cehck `build.yaml` configuration
package:artemis/builder.dart 31:5             _builderOptionsToExpectedOutputs
package:artemis/builder.dart 56:27            new GraphQLQueryBuilder
package:artemis/builder.dart 17:5             graphQLQueryBuilder
package:build_runner                          BuildCommand._run
package:args/command_runner.dart 209:13       CommandRunner.runCommand
package:build_runner                          run
.dart_tool/build/entrypoint/build.dart 33:16  main
GraphQL schema:
# If possible, please paste your GraphQL schema file,
# or a minimum reproducible schema of the bug.

No schema, as for the app package I only want access to ArtemisClient, not any code generation tools.

GraphQL query:
# If possible, please paste your GraphQL query file,
# or a minimum reproducible query of the bug.

No query, as for the app package I only want access to ArtemisClient, not any code generation tools.

CelticMajora avatar Mar 24 '22 19:03 CelticMajora