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

Unhandled exception: System.ArgumentException: The source text mustn't be null or empty. (Parameter 'sourceText') #2

Open
Fettah opened this issue Jan 17, 2024 · 0 comments

Comments

@Fettah
Copy link

Fettah commented Jan 17, 2024

I am integrating my graphql backend with this amazing tool but I am getting this error in AzueDevops. any idea ?

Unhandled exception: System.ArgumentException: The source text mustn't be null or empty. (Parameter 'sourceText')
   at HotChocolate.Language.Utf8GraphQLParser.Parse(String sourceText, ParserOptions options)
   at HotChocolate.Language.Utf8GraphQLParser.Parse(String sourceText)
   at SchemaCompare.SchemaComparer.DetectBreakingChanges(String oldSchema, String newSchema) in C:\github\GraphQlBreakingSchemaChangeDetector\src\SchemaCompare\SchemaComparer.cs:line 10
   at AzureDevops.AdoSchemaComparer.CreateCommentsForBreakingChanges(String file) in C:\github\GraphQlBreakingSchemaChangeDetector\src\Integration\AzureDevops\AdoSchemaComparer.cs:line 47
   at AzureDevops.AdoSchemaComparer.ReportBreakingChangesInPr(String file) in C:\github\GraphQlBreakingSchemaChangeDetector\src\Integration\AzureDevops\AdoSchemaComparer.cs:line 23
   at Cli.PrCommand.<>c.<<Create>b__0_1>d.MoveNext() in C:\github\GraphQlBreakingSchemaChangeDetector\src\Cli\PrCommand.cs:line 38
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass18_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass13_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass20_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__19_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__6_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass9_0.<<UseExceptionHandler>b__0>d.MoveNext()

Here is the code I am using:

stages:
  - stage: graphql_inspection_dotnet
    displayName: 'Graphql Inspection Dotnet'
    jobs:
      - job: graphql_inspection_job
        displayName: 'Graphql Inspection Dotnet'
        pool:
          vmImage: 'ubuntu-latest'
        steps:
          - task: UseDotNet@2
            inputs:
              version: '6.0.x'
              includePreviewVersions: false

          - checkout: self
            displayName: 'Checkout'
            clean: true
            persistCredentials: true

          - script: |
              dotnet tool install --tool-path . graphql-breaking-schema-change-detector
              cat ./apps/time-series-api/src/schema.gql
              ./breaking-change pr --file ./apps/time-series-api/src/schema.gql
            env:
              SYSTEM_ACCESSTOKEN: $(System.AccessToken)
            displayName: 'Run Breaking Change Detector'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant