ย
๐คฉ Desktop ~ 100% ย
๐ง Mobile ~ 60%
๐ฑ Watch ~ 20%
๐ /desktop/launches
๐คจ /mobile/launches
๐ค /watch/launches
๐คฉ /launches - 1 HTTP/DB
๐ง /rocket/:id - 'N' HTTP/DB
๐ญ Client parse functions
๐ /graphql - 1 HTTP/'N' DB
๐ No client parse functions
ย
GQL Asia ๐ฎ๐ณ Apr 12-13ย
GQL Conf ๐ฉ๐ช Jun 20-21
GQL HK ๐ญ๐ฐ Sept 29
GQL Summit ๐บ๐ธ Oct 29-31
ย
Thanks ๐
so much!
Hoping to ย ย ย ย ย ย ย ย seeing y'all
ย
ย
@ GraphQL ๐ญ๐ฐ Hong Kong
Schema First
๐ Fully client-focused (SDL)
๐ Code reuse, Type safety
๐ Apollo Server
Code/Model First
๐ Code reuse, Type safety
๐ Most "distance" between code-schema
๐ GraphQL Nexus
Resolver First
๐ Lowest abstraction level
๐ Verbose, Less client focus
๐ graphql.js
type Query {
launches: [Launch]
launch(id: ID!): Launch
}
type Launch {
id: ID!
name: String
details: String
image: String
rocket: Rocket
ship: Ship
}
type Rocket {
id: ID!
name: String
}
type Ship {
id: ID!
name: String
port: String
image: String
}
Query: {
launches: async (obj, args, context) => {
const data = await context.db
.collection('launch')
.toArray();
return data;
},
launch: async (obj, { id }, context) => {
const [data] = await context.db
.collection('launch')
.find({ id })
.toArray();
return data;
},
}
Type Definitions
Resolvers
Type-Safe GraphQL Servers
Hong Kong JS and Node.js