Skip to content

Commit 8c20315

Browse files
committed
Fix relative paths in the README links
1 parent a0db28d commit 8c20315

File tree

1 file changed

+54
-19
lines changed

1 file changed

+54
-19
lines changed

README.md

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
# Introduction
22

3-
[GraphQL](https://graphql.org/) and [React](https://reactjs.org/) go together like peanut butter and jelly, especially if you use a GraphQL client/compiler like [Relay](http://facebook.github.io/relay/en/) or [Apollo](https://github.com/apollographql/apollo-client).
4-
5-
But GraphQL services are only implemented on the server. When using React Native or React JS in a hybrid application, you typically have a native application which hosts islands or entire pages of UI rendered with React components, and you might like to display content that you've cached offline or that you otherwise generate on the client without needing to declare a separate data interface or require a server round trip to load it.
6-
7-
This project includes a `graphqlservice` library with the core functionality of a GraphQL service and a `schemagen` utility to generate types for your custom GraphQL service schema definition. Once you implement the pure virtual methods on the object interfaces and add hooks to the Relay [Network Layer](https://facebook.github.io/relay/docs/en/network-layer.html)/Apollo [Terminating Link](https://www.apollographql.com/docs/link/overview.html#terminating) to call your service, you can use the same GraphQL client code to access your native data source or a GraphQL service online. You might even be able to share some more of that code between a progressive web app and your native/hybrid app.
3+
[GraphQL](https://graphql.org/) and [React](https://reactjs.org/) go together like peanut butter
4+
and jelly, especially if you use a GraphQL client/compiler like [Relay](http://facebook.github.io/relay/en/)
5+
or [Apollo](https://github.com/apollographql/apollo-client).
6+
7+
But GraphQL services are only implemented on the server. When using React Native or React JS in a
8+
hybrid application, you typically have a native application which hosts islands or entire pages of
9+
UI rendered with React components, and you might like to display content that you've cached offline
10+
or that you otherwise generate on the client without needing to declare a separate data interface
11+
or require a server round trip to load it.
12+
13+
This project includes a `graphqlservice` library with the core functionality of a GraphQL service
14+
and a `schemagen` utility to generate types for your custom GraphQL service schema definition. Once
15+
you implement the pure virtual methods on the object interfaces and add hooks to the Relay
16+
[Network Layer](https://facebook.github.io/relay/docs/en/network-layer.html)/Apollo
17+
[Terminating Link](https://www.apollographql.com/docs/link/overview.html#terminating) to call your
18+
service, you can use the same GraphQL client code to access your native data source or a GraphQL
19+
service online. You might even be able to share some more of that code between a progressive web
20+
app and your native/hybrid app.
821

922
# Getting Started
1023

1124
## Installation process
1225

13-
First, clone this repo, then make sure you have the dependencies. Acquiring the dependencies is a bit different depending on your platform.
26+
First, clone this repo, then make sure you have the dependencies. Acquiring the dependencies is a
27+
bit different depending on your platform.
1428

15-
I've tested this on Windows with Visual Studio 2017 and Linux using an Ubuntu instance running in WSL.
29+
I've tested this on Windows with Visual Studio 2017 and Linux using an Ubuntu instance running in
30+
WSL.
1631

1732
I plan on adding a vcpkg package for this project, and then you can install everything with `vcpkg install cppgraphqlgen`.
1833

@@ -24,49 +39,68 @@ I picked a few projects as dependencies:
2439
- GraphQL parsing: [Parsing Expression Grammar Template Library (PEGTL)](https://github.com/taocpp/PEGTL), which is part of [The Art of C++](https://taocpp.github.io/) library collection.
2540
- Unit testing: [Google Test](https://github.com/google/googletest) for the unit testing framework.
2641

27-
The build system for this project uses [CMake](http://www.cmake.org/). You'll need to have all 3 dependencies installed on your system along with CMake to build this project.
42+
The build system for this project uses [CMake](http://www.cmake.org/). You'll need to have all 3
43+
dependencies installed on your system along with CMake to build this project.
2844

2945
### Using vcpkg
3046

31-
Vcpkg can install the dependencies from source on either platform, and that's what I'm using on Windows. Use `vcpkg install rapidjson pegtl gtest` to get all of them.
47+
Vcpkg can install the dependencies from source on either platform, and that's what I'm using on
48+
Windows. Use `vcpkg install rapidjson pegtl gtest` to get all of them.
3249

3350
This approach works well on Linux. I've done all of my testing for Linux with WSL using vcpkg.
3451

3552
### Windows with NuGet
3653

37-
All of these packages dependencies should also be available in NuGet packages if you don't want to use [vcpkg](https://github.com/Microsoft/vcpkg) but still want to use a package manager.
54+
All of these packages dependencies should also be available in NuGet packages if you don't want to
55+
use [vcpkg](https://github.com/Microsoft/vcpkg) but still want to use a package manager.
3856

3957
### Linux or Windows from GitHub
4058

41-
Clone each of the repos from GitHub and follow the installation instructions in the README.md files.
59+
Clone each of the repos from GitHub and follow the installation instructions in the README.md
60+
files.
4261

4362
## API references
4463

45-
See [GraphQLService.h](GraphQLService.h) for the base types implemented in the `facebook::graphql::service` namespace. Take a look at [Today.h](Today.h) and [Today.cpp](Today.cpp) to see a sample implementation of a custom schema defined in [schema.today.graphql](schema.today.graphql) for testing purposes.
64+
See [GraphQLService.h](include/graphqlservice/GraphQLService.h) for the base types implemented in
65+
the `facebook::graphql::service` namespace. Take a look at [Today.h](Today.h) and [Today.cpp](Today.cpp)
66+
to see a sample implementation of a custom schema defined in [schema.today.graphql](samples/schema.today.graphql)
67+
for testing purposes.
4668

47-
All of the generated files are in the [samples](samples/) directory. If you modify the code generator in SchemaGenerator.* and rebuild, `make install` will update them. Please remember to include updating the samples in any pull requests which change them.
69+
All of the generated files are in the [samples](samples/) directory. If you modify the code
70+
generator in SchemaGenerator.* and rebuild, `make install` will update them. Please remember to
71+
include updating the samples in any pull requests which change them.
4872

4973
# Build and Test
5074

5175
## Windows
5276

53-
There are a couple of options for building on Windows. You can either run CMake from the command line, or you can use the CMake integration in Visual Studio. They behave a little differently, but I prefer building and running tests in Visual Studio, then optionally performing a Release build and install from the command line.
77+
There are a couple of options for building on Windows. You can either run CMake from the command
78+
line, or you can use the CMake integration in Visual Studio. They behave a little differently, but
79+
I prefer building and running tests in Visual Studio, then optionally performing a Release build
80+
and install from the command line.
5481

5582
### Visual Studio
5683

57-
Use the Open Folder command to open the root of the repo. If you've installed the dependencies with vcpkg and run its Visual Studio integration command, Visual Studio should know how to build each of the targets in this project automatically. I've only been able to get x86-debug to work so far in Visual Studio though, it doesn't switch properly between the Debug and Release dependencies installed by vcpkg on my machine.
84+
Use the Open Folder command to open the root of the repo. If you've installed the dependencies with
85+
vcpkg and run its Visual Studio integration command, Visual Studio should know how to build each of
86+
the targets in this project automatically. I've only been able to get x86-debug to work so far in
87+
Visual Studio though, it doesn't switch properly between the Debug and Release dependencies
88+
installed by vcpkg on my machine.
5889

5990
### Command Line
6091

6192
To build from the command line, run:
6293

63-
`cmake -DCMAKE_TOOLCHAIN_FILE=<...path to vcpkg root...>/scripts/buildsystems/vcpkg.cmake .` once to populate the Visual Studio solution files, then:
94+
`cmake -DCMAKE_TOOLCHAIN_FILE=<...path to vcpkg root...>/scripts/buildsystems/vcpkg.cmake .` once
95+
to populate the Visual Studio solution files, then:
6496

6597
`msbuild cppgraphql.sln` to perform the build.
6698

67-
You can also build optional `.vcxproj` project files with msbuild to perform the associated task, e.g. installing or running tests.
99+
You can also build optional `.vcxproj` project files with msbuild to perform the associated task,
100+
e.g. installing or running tests.
68101

69-
If you want to make a Release build, add the `/p:Configuration=Release` argument to the `msbuild` command line.
102+
If you want to make a Release build, add the `/p:Configuration=Release` argument to the `msbuild`
103+
command line.
70104

71105
## Linux
72106

@@ -84,7 +118,8 @@ You can then optionally install the public outputs by running:
84118

85119
Run the unit tests with `tests` from the build output directory.
86120

87-
If you want to try an interactive version, you can run `test_today` and paste in queries against the same mock service or load a query from a file on the command line.
121+
If you want to try an interactive version, you can run `test_today` and paste in queries against
122+
the same mock service or load a query from a file on the command line.
88123

89124
## Reporting Security Issues
90125

0 commit comments

Comments
 (0)