buildSchemaLibrary function

Library buildSchemaLibrary(
  1. SourceNode schemaSource,
  2. String partUrl,
  3. Map<String, Reference> typeOverrides,
  4. EnumFallbackConfig enumFallbackConfig,
)

Implementation

Library buildSchemaLibrary(
    SourceNode schemaSource,
    String partUrl,
    Map<String, Reference> typeOverrides,
    EnumFallbackConfig enumFallbackConfig) {
  final lib = buildSchema(
    schemaSource,
    typeOverrides,
    enumFallbackConfig,
  ) as Library;

  return lib.rebuild(
    (b) => b
      ..directives.add(
        Directive.part(partUrl),
      ),
  );
}