Expose user-defined meta-information via introspection API in form of directives
With growing popularity of IDL as a way to define a GraphQL schema, I think it would be quite beneficial to expose directive information via introspection API. From what I can tell, the directive information is the only missing piece of information that is not obtainable via introspection API. For example in this schema definition: ```graphql type User { id: ID! name: String admin: Boolean! @important } type Query { user: User } ``` `@important` directive is only available at schema materialization time, but discarded as soon as schema is materialized from AST definitions. One can see directives as a way to instruct server to construct the schema is specific way. But I would argue that directives have also a lot of potential as a way to expose additional meta-information about the schema. This may include things like: field cost/complexity (the use case I'm quite interested in), auth information, caching characteristics, and in general any kind of structured meta-information that is specific to a particular application or subset of applications. I think a lot of interesting use-cases and scenarios can emerge as soon as this meta-information is exposed via introspection. I can also imagine community working together on a set of common directives that may be adopted by client tooling and frameworks like apollo and relay. These common directives (exposed via introspection API) may provide deeper insights on the schema, relations between fields and objects, etc. I d
Posted by OlegIlyenko on Apr 28, 2017, 2:39 AM
Tags
Related issues
- > I had the opinion that it'd be too expensive for developers to support offline mode, peer to peer, or community servers after shutdown ...
- "Best build quality" is the most important part.
- Historically that rarely happens because industrial equipment is/was generally too expensive for the average worker to purchase on t...
- I can see why they wanted to change the "RISC-V is inevitable" line.
- The GB10 itself is pretty good and I love using mine for broad Linux development.
- > Nothing stops someone from taking the free Windows Vivado and making it run on Linux The EULA and the fact that the linux versior runs...
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
pricing (Sysadmin)
> I had the opinion that it'd be too expensive for developers to support offline mode, peer to peer, or community servers after shutdown ...
"Best build quality" is the most important part.
Historically that rarely happens because industrial equipment is/was generally too expensive for the average worker to purchase on t...
I can see why they wanted to change the "RISC-V is inevitable" line.
The GB10 itself is pretty good and I love using mine for broad Linux development.
> Nothing stops someone from taking the free Windows Vivado and making it run on Linux The EULA and the fact that the linux versior runs...
Hetzner has some docs: https://docs.hetzner.com/robot/dedicated-server/ip/additiona...
> too expensive for our internal server needs; not the right fit for our datacenter partners/customers You and me both.
Expose user-defined meta-information via introspection API in form of directives
With growing popularity of IDL as a way to define a GraphQL schema, I think it would be quite beneficial to expose directive information via introspection API. From what I can tell, the directive information is the only missing piece of information that is not obtainable via introspection API. For example in this schema definition: ```graphql type User { id: ID! name: String admin: Boolean! @important } type Query { user: User } ``` `@important` directive is only available at schema materialization time, but discarded as soon as schema is materialized from AST definitions. One can see directives as a way to instruct server to construct the schema is specific way. But I would argue that directives have also a lot of potential as a way to expose additional meta-information about the schema. This may include things like: field cost/complexity (the use case I'm quite interested in), auth information, caching characteristics, and in general any kind of structured meta-information that is specific to a particular application or subset of applications. I think a lot of interesting use-cases and scenarios can emerge as soon as this meta-information is exposed via introspection. I can also imagine community working together on a set of common directives that may be adopted by client tooling and frameworks like apollo and relay. These common directives (exposed via introspection API) may provide deeper insights on the schema, relations between fields and objects, etc. I d
Comments (0)
No comments yet. Start the discussion.