wallee94 / graphdoc

Autogenerate HTML docs for your GraphQL API
https://wallee94.github.io/graphdoc/
MIT License
14 stars 4 forks source link

Create different docs url based on schema or table name #2

Closed PriyatamNayak closed 3 years ago

PriyatamNayak commented 3 years ago

@wallee94 Want to create different url for different schema

like bloomberg... it should contains bloomberg info(schema) if will pass ice (it should create ice/docs)

means for dynamic scema genearation based on tablename and dynamic docs generation

or if schema is not dynamic how can segregate the docs schema wise to different url instead putting all in one docs url? is it possible?

wallee94 commented 3 years ago

Yes, you can create multiple schemas and use them to create different docs in different endpoints. The example with graphene-django in the readme uses GraphQLView().schema, that points to the schema set in your settings.py, but you can also import and use the schema directly instead of using GraphQLView

I added an example that doesn't use GraphQLView in the readme: https://github.com/wallee94/graphdoc#documenting-multiple-api

Remember to use schema.graphql_schema instead of just schema if you're using graphene 3.