Skip to content

Add support for only skip and failing annotations in GraphQLSpec #603

@tusharmath

Description

@tusharmath

Currently there is no way for a developer to control which spec to run, ignore or expect to fail.

 struct GraphQLSpec {
   path: PathBuf,
   client_sdl: String,
   server_sdl: Vec<String>,
   merged_server_sdl: String,
   sdl_errors: Vec<SDLError>,
   test_queries: Vec<GraphQLQuerySpec>,
+  annotation: Option<Annotation>
 }

+ enum Annotation {Skip, Only, Fail}

The annotations will contain skip or only or failing

Technical Specifications

  • only: If any spec contains only only that spec should be executed. Eg:

    #> spec-only
    
    #> server-sdl
    schema { query: Query }
    
    #> client-sdl
    schema {query: Query}
  • skip: if a spec contains skip then that should be skipped, and a warn log should be printed. Eg:

    #> spec-skip
    
    #> server-sdl
    schema { query: Query }
    
    #> client-sdl
    schema {query: Query}
  • fail: Expect the spec to fail. Panic incase it doesn't fail. Eg:

    #> spec-fail
    
    #> server-sdl
    schema { query: Query }
    
    #> client-sdl
    schema {query: Query}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions