@@ -25,7 +25,7 @@ app and your native/hybrid app.
25
25
26
26
## Related projects
27
27
28
- I created a couple of sample projects to demonstrate integrating the [ schema.today.graphql] ( ./samples/schema.today.graphql )
28
+ I created a couple of sample projects to demonstrate integrating the [ schema.today.graphql] ( ./samples/today/ schema.today.graphql )
29
29
service into an Electron app. They're available under my personal account, feel free to use either or both of these as a
30
30
starting point to integrate your own generated service with Node or Electron:
31
31
* [ electron-cppgraphql] ( https://github.com/wravery/electron-cppgraphql ) : Node Native Module which compiles
@@ -74,13 +74,20 @@ files.
74
74
## API references
75
75
76
76
See [ GraphQLService.h] ( include/graphqlservice/GraphQLService.h ) for the base types implemented in
77
- the ` facebook::graphql::service ` namespace. Take a look at [ Today.h] ( include/Today.h ) and [ Today.cpp] ( Today.cpp )
78
- to see a sample implementation of a custom schema defined in [ schema.today.graphql] ( samples/schema.today.graphql )
79
- for testing purposes.
80
-
81
- All of the generated files are in the [ samples] ( samples/ ) directory. If you modify the code
82
- generator in SchemaGenerator.* and rebuild, ` make install ` will update them. Please remember to
83
- include updating the samples in any pull requests which change them.
77
+ the ` facebook::graphql::service ` namespace. Take a look at [ UnifiedToday.h] ( samples/today/UnifiedToday.h ) and
78
+ [ UnifiedToday.cpp] ( samples/today/UnifiedToday.cpp ) to see a sample implementation of a custom schema defined
79
+ in [ schema.today.graphql] ( samples/today/schema.today.graphql ) for testing purposes.
80
+
81
+ All of the generated files are in the [ samples] ( samples/ ) directory. There are two different versions of
82
+ the generated code, one which creates a single pair of files (` samples/unified/ ` ), and one which uses the
83
+ ` --separate-files ` flag with ` schemagen ` to generate individual header and source files (` samples/separate/ ` )
84
+ for each of the object types which need to be implemeneted. The only difference between [ UnifiedToday.h] ( samples/today/UnifiedToday.h )
85
+ and [ SeparateToday.h] ( samples/today/SeparateToday.h ) should be that the ` SeparateToday ` use a generated
86
+ [ TodayObjects.h] ( samples/separate/TodayObjects.h ) convenience header which includes all of the inidividual
87
+ object header along with the rest of the schema in [ TodaySchema.h] ( samples/separate/TodaySchema.h ) .
88
+
89
+ If you modify the code generator in SchemaGenerator.* and rebuild, ` make install ` will update them. Please
90
+ remember to include updating the samples in any pull requests which change them.
84
91
85
92
# Build and Test
86
93
0 commit comments