mirror of
https://github.com/zhigang1992/apollo.git
synced 2026-01-12 08:53:57 +08:00
Update 18-03-06.md
This commit is contained in:
@@ -2,15 +2,12 @@
|
||||
|
||||
### Attendees
|
||||
|
||||
- Evans
|
||||
- James
|
||||
- Ben
|
||||
|
||||
### Agenda
|
||||
|
||||
**React-apollo**
|
||||
|
||||
**apollo-server**
|
||||
|
||||
**apollo-link**
|
||||
|
||||
**apollo-bot**
|
||||
|
||||
* Issues labels are: good-first-issue, feature, has-reproduction, blocking
|
||||
@@ -18,3 +15,49 @@
|
||||
|
||||
### Notes
|
||||
|
||||
**schema directives**
|
||||
|
||||
Currently have the ability to wrap resolvers and modify the GraphQL AST objects themselves
|
||||
- think of it as the SDL as it's own language. Directives operate on the AST
|
||||
- babel plugins(similar to babel macros) for your schema or think of as codegen
|
||||
- parse schema into AST of Gql objects, then use it to control execution of queries
|
||||
- generating an interpreter
|
||||
- never turn back into code!
|
||||
|
||||
Issues:
|
||||
|
||||
- adds some fields to an object, do you visit later?
|
||||
- have to populate the ASt nodes
|
||||
- provide a string of SDL
|
||||
- or just operate on the objects that are returned
|
||||
- what should we return from our vistor method?
|
||||
|
||||
Use Cases:
|
||||
|
||||
- write schema from swagger and could additively create new types on it
|
||||
- fetch swagger schema and generate a bunch of GQL objects
|
||||
- root query's arguments contains the args to swagger
|
||||
- import schema and extend types that are backed by swagger
|
||||
- additively make graph from rest endpoint
|
||||
- schema or type imports
|
||||
- worries about depending on file systems during run time
|
||||
- directives are great way to put a timeout on your fields
|
||||
|
||||
Misc:
|
||||
|
||||
- typed systems can have issues with circular imports
|
||||
- User contains Friend and Friend contains User
|
||||
- JS does this with module loader
|
||||
|
||||
Next week: we will have a discussion on use cases and issues that have come up. Open to anyone(publicized through twitter)
|
||||
|
||||
**mjs?**
|
||||
|
||||
Current plan compiling down to cjs and making sure that everyone can import
|
||||
mjs breaks typescript support
|
||||
some temptation to allow rollup
|
||||
lambda is argument for having module entry point
|
||||
most browsers have native class suppport
|
||||
only want one babel preset
|
||||
|
||||
super works with a compiled class as superclass
|
||||
|
||||
Reference in New Issue
Block a user