Name | Author | SSR | Auth | Apollo Integration | Routing | Code Splitting |
---|---|---|---|---|---|---|
Meteor Starter Kit | @apollographql | ❌ | ✅ | meteor:apollo@0.9.1 | ❌ | ❌ |
Meteor React Starter | @CaptainN | ✅ | ✅ | ❌ | React-Router 4 | ✅ |
[Meteor Apollo Starter Kit](https://github.com/fede-ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalar JSON | |
scalar Date | |
# Type for Movies | |
type Movie { | |
_id: String | |
createdAt: Date | |
user: User | |
userId: String | |
name: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IntlDirective extends SchemaDirectiveVisitor { | |
visitFieldDefinition(field, details) { | |
const fieldName = field.name; | |
field.resolve = async function (...args) { | |
// get document, GraphQL arguments, and query context | |
const [ doc, graphQLArguments, context ] = args; | |
// get the locale either from the query's arguments, or from the context | |
const locale = graphQLArguments.locale || context.locale; | |
// get the field containing translations | |
const intlField = doc[`${name}_intl`]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"stations" : [ | |
{ | |
"name" : "Shinjuku Gyoenmae front", | |
"distance" : 549, | |
"distanceFormatted" : "0.5 km", | |
"duration" : "3 mins", | |
"location" : { | |
"lng" : 139.71069, | |
"lat" : 35.688588 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "id": 11301, "name": { "ja": "JR東海道本線(東京~熱海)", "en": "JR Tokaido Main Line (Tokyo - Atami)" } }, | |
{ "id": 11302, "name": { "ja": "JR山手線", "en": "JR Yamanote Line" } }, | |
{ "id": 11303, "name": { "ja": "JR南武線", "en": "JR Nambu Line" } }, | |
{ "id": 11305, "name": { "ja": "JR武蔵野線", "en": "JR Musashino Line" } }, | |
{ "id": 11306, "name": { "ja": "JR横浜線", "en": "JR Yokohama Line" } }, | |
{ "id": 11308, "name": { "ja": "JR横須賀線", "en": "JR Yokosuka Line" } }, | |
{ "id": 11311, "name": { "ja": "JR中央本線(東京~塩尻)", "en": "JR Chuo Main Line (Tokyo ~ Shiojiri)" } }, | |
{ "id": 11312, "name": { "ja": "JR中央線(快速)", "en": "JR Chuo Line (fast)" } }, | |
{ "id": 11313, "name": { "ja": "JR中央・総武線", "en": "JR Chuo Sobu Line" } }, |
Field-specific queries work by adding “extra” query parts to a specialy created formNewExtraQuery
HoC when inserting new documents; or to the withDocument
HoC when editing an existing document. In either case, the main query will be called with the following extraTerms
argument:
const extraTerms = {
documentId,
currentUser,
view: `${collectionName}ExtraQueryView` // where collectionName is the collection the form belongs to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Type for Movies | |
type Movie { | |
_id: String | |
createdAt: Date | |
user: User | |
userId: String | |
name: String | |
year: String | |
review: String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Generate the appropriate fragment for the current form, then | |
wrap the main Form component with the necessary HoCs while passing | |
them the fragment. | |
This component is itself wrapped with: | |
- withCurrentUser | |
- withApollo (used to access the Apollo client for form pre-population) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Front-End | |
preact | |
mithril | |
inferno | |
elm | |
skate | |
cycle | |
avalon | |
sencha |