microsoft / typespec

https://typespec.io/
MIT License
4.55k stars 222 forks source link

Add `@schema` decorator to mark namespaces as GraphQL schemas #5159

Open steverice opened 5 days ago

steverice commented 5 days ago

Using the TypeSpec.GraphQL.@schema decorator on a namespace indicates that the decorated namespace represents a GraphQL schema that should be generated by the GraphQL emitter.

Because this allows for multiple schemas to be specified in a TypeSpec source, our test host is reworked to provide a GraphQLTestResult corresponding to each schema produced.

This commit does not actually implement any emitter functionality, but populates a state map that will be used by the emitter in the future.