Skip to content

Commit

Permalink
Updated Docs wording project -> service
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrandwijk authored and nikolasburk committed Nov 2, 2017
1 parent a5a62a9 commit 28203a4
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/04-Reference/02-Graphcool-CLI/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
description: Learn how to manage a Graphcool project using the Graphcool CLI. Every command is documented in detail.
description: Learn how to manage a Graphcool service using the Graphcool CLI. Every command is documented in detail.
---
6 changes: 3 additions & 3 deletions docs/04-Reference/03-Database/02-Data-Modelling.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ There are several available building blocks to shape your data model.
* [Relations](#relations) describe interactions between types.
* Special [directives](#graphql-directives) that cover different use cases are available.

Additionally, a project can contain prepopulated types and fields, referred to as [system artifacts](#system-artifacts). Different [naming conventions](#naming-conventions) define valid names.
Additionally, a service can contain prepopulated types and fields, referred to as [system artifacts](#system-artifacts). Different [naming conventions](#naming-conventions) define valid names.

### Writing a data model

Expand All @@ -53,7 +53,7 @@ There are three system fields, all of which are managed by the Graphcool runtime

#### Required system field: `id`

Every type that you define with the `@model` directive needs to have an `id: ID! @isUnique` field, otherwise `graphcool deploy` is going to fail. This `id` however is managed by Graphcool: Every new node that is created in your project will get assigned a globally unique ID automatically.
Every type that you define with the `@model` directive needs to have an `id: ID! @isUnique` field, otherwise `graphcool deploy` is going to fail. This `id` however is managed by Graphcool: Every new node that is created in your service will get assigned a globally unique ID automatically.

Notice that all your model types will implement the `Node` interface in the actual GraphQL schema that defines all the capabilities of your API. This is what the `Node` interface looks like:

Expand Down Expand Up @@ -364,7 +364,7 @@ The *temporary directive `@migrationValue(value: String!)`* is used to migrate t

## Naming Conventions

Different objects you encounter in a Graphcool project like types or relations follow separate naming conventions to help you distinguish them.
Different objects you encounter in a Graphcool service like types or relations follow separate naming conventions to help you distinguish them.

### Types

Expand Down
4 changes: 2 additions & 2 deletions docs/04-Reference/04-GraphQL-API/04-Subscription-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ subscription newPosts {

Subscriptions use a special websocket endpoint.

Here's a list of available subscriptions. To explore them, use the [playground](!alias-oe1ier4iej) inside your project.
Here's a list of available subscriptions. To explore them, use the [playground](!alias-oe1ier4iej) inside your service.

- For every [model type](!alias-eiroozae8u#model-types) in your data model, a [type subscription](#type-subscriptions) query is available to listen for changes to nodes of this.
- Currently, connecting or disconnecting nodes in a [relation](!alias-eiroozae8u#relations) does not trigger a subscription! Read more about [available workaround](#relation-subscriptions) for this limitation.
Expand All @@ -70,7 +70,7 @@ A GraphQL [Playground](https://github.com/graphcool/graphql-playground) can be u
Subscriptions are managed through WebSockets. First establish a WebSocket connection and specify the `graphql-subscriptions` protocol:

```js
let webSocket = new WebSocket('wss://subscriptions.graph.cool/v1/__PROJECT_ID__', 'graphql-subscriptions');
let webSocket = new WebSocket('wss://subscriptions.graph.cool/v1/__SERVICE_ID__', 'graphql-subscriptions');
```
#### Initiate handshake

Expand Down
2 changes: 1 addition & 1 deletion docs/04-Reference/05-Functions/02-Runtime-Environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This `context` has the following structure:
nodeId # if request is authenticated, this is the `id` of the corresponding node
token # if request is authenticated, this is the valid authentication token
},
# project info
# service info
graphcool: {
projectId # this will be deprecated shortly, use serviceId instead
serviceId
Expand Down
8 changes: 4 additions & 4 deletions docs/04-Reference/05-Functions/04-Subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Subscriptions are a simple yet powerful event-based concept on top

## Overview

Subscriptions are a simple yet powerful concept to handle business logic in your project. You can **subscribe to specific events** that are happening inside the GraphQL engine. All (successful) mutations are considered events.
Subscriptions are a simple yet powerful concept to handle business logic in your service. You can **subscribe to specific events** that are happening inside the GraphQL engine. All (successful) mutations are considered events.

> Unlike hooks, functions for subscriptions are called **asynchronously**, _after_ a database transaction was entirely processed.
Expand All @@ -17,9 +17,9 @@ The input data for subscription functions is determined by the subscription quer

The concrete shape of the subscription query is determined by the [Subscription API](!alias-aip7oojeiv).

## Adding a Subscription function to the project
## Adding a Subscription function to the service

When you want to create a subscription function in your Graphcool project, you need to add it to the project configuration file under the `functions` section.
When you want to create a subscription function in your Graphcool service, you need to add it to the service configuration file under the `functions` section.

### Example

Expand Down Expand Up @@ -54,7 +54,7 @@ subscription {

### Properties

Each function that's specified in the project configuration file needs to have the `type` and `handler` properties.
Each function that's specified in the service configuration file needs to have the `type` and `handler` properties.

For subscription functions, you additionally need to specify the `query` property which points to a file containing a regular GraphQL subscription query.

Expand Down
4 changes: 2 additions & 2 deletions docs/04-Reference/05-Functions/05-Resolvers.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ enum TemperatureUnit {
}
```

`loadWeather ` is invoked _after_ a `User` node was created and is defined as a _webhook_. It receives as input the requested `TemnperatureUnit` (as this is the only argument for the `weather` field on the `Query` type) and returns a new type called `Weather`.
`loadWeather ` is invoked _after_ a `User` node was created and is defined as a _webhook_. It receives as input the requested `TemperatureUnit` (as this is the only argument for the `weather` field on the `Query` type) and returns a new type called `Weather`.

### Properties

Each function that's specified in the project configuration file needs to have the `type` and `handler` properties.
Each function that's specified in the service configuration file needs to have the `type` and `handler` properties.

For resolver functions, you additionally need to specify the `schema ` property which points to a file containing your extension of the `Query` or `Mutation` type as well as any additional types that you're defining for this operation.

Expand Down
2 changes: 1 addition & 1 deletion docs/04-Reference/06-Auth/01-Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: The auth concept at Graphcool combines flexible authentication with

Graphcool comes with **powerful authentication and authorization out-of-the-box**.

You can choose between a wide range of option to enable [user authentication](!alias-geekae9gah) for your project. [Authentication tokens](!alias-eip7ahqu5o) are used to authenticate users as well as server-side calls to your API.
You can choose between a wide range of option to enable [user authentication](!alias-geekae9gah) for your service. [Authentication tokens](!alias-eip7ahqu5o) are used to authenticate users as well as server-side calls to your API.

With the [authorization system](!alias-iegoo0heez), it's easy to create [powerful permission rules](!alias-iox3aqu0ee) that seamlessly integrate with authentication.

Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Be **very** careful where you use the root tokens. Everyone with a root token ha

_Regular_ root tokens are created with the Graphcool [CLI](!alias-aiteerae6l#graphcool-root-token) and the [service definition](!alias-foatho8aip#roottokens).

To create a new root token, you need to add a new entry to the `rootTokens` list in your [`graphcool.yml`](!alias-foatho8aip). The entry defines the _name_ of the root token. Here is an example where a project has two root tokens, called `myToken1` and `myToken2`:
To create a new root token, you need to add a new entry to the `rootTokens` list in your [`graphcool.yml`](!alias-foatho8aip). The entry defines the _name_ of the root token. Here is an example where a service has two root tokens, called `myToken1` and `myToken2`:

```yml
rootTokens:
Expand Down
2 changes: 1 addition & 1 deletion docs/04-Reference/07-API-Gateway/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
description: Learn how to deploy your Graphcool project to different environments.
description: Learn how to deploy your Graphcool service to different environments.
---
2 changes: 1 addition & 1 deletion docs/04-Reference/08-Deployment/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
description: Learn how to deploy your Graphcool project to different environments.
description: Learn how to deploy your Graphcool service to different environments.
---
2 changes: 1 addition & 1 deletion docs/05-FAQ/02-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Frequently asked questions about the API that's provided by Graphco

### What is the difference between the Simple API and the Relay API?

Every Graphcool project comes with two different GraphQL APIs. Note that both APIs still access the same underlying database!
Every Graphcool service comes with two different GraphQL APIs. Note that both APIs still access the same underlying database!

- The **Simple API** exposes simple and intuitive CRUD operations and supports realtime functionality based on GraphQL subscriptions. This should be the default for any consumer of the API that's not using Facebook's homegrown GraphQL client [Relay](https://github.com/facebook/relay).
- The **Relay API** also exposes CRUD operations while adhering to the [specific requirements](https://facebook.github.io/relay/docs/graphql-relay-specification.html) of Relay.
Expand Down
2 changes: 1 addition & 1 deletion docs/05-FAQ/04-Auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ If you don't have custom requirements for your authentication, you can convenien
There generally are two different kinds of tokens that you can use to authenticate requests:

- [Temporary authentication tokens](!alias-eip7ahqu5o#temporary-authentication-tokens): These are the tokens you are issuing to your users. They are generated using [graphcool-lib](https://github.com/graphcool/graphcool-lib) and each token is always associated with one particular _node_ (usually represting a _user_) in your database. Temporary authentication tokens will expire and your users have to acquire a new one.
- [Root tokens](!alias-eip7ahqu5o#root-tokens): Root tokens are tokens that are valid indefinitely. Each root token is associated with exactly one Graphcool project and can be used to perform any operation in the API of that project.
- [Root tokens](!alias-eip7ahqu5o#root-tokens): Root tokens are tokens that are valid indefinitely. Each root token is associated with exactly one Graphcool service and can be used to perform any operation in the API of that service.
2 changes: 1 addition & 1 deletion docs/05-FAQ/05-Functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The [`graphcool-lib`](https://github.com/graphcool/graphcool-lib) provides a con

Here's some functionality it offers:

- convenience API for sending queries and mutations to a Graphcool project (based on [`graphql-request`](https://github.com/graphcool/graphql-request))
- convenience API for sending queries and mutations to a Graphcool service (based on [`graphql-request`](https://github.com/graphcool/graphql-request))
- generating a temporary authentication token for a node in your database

If you want to use it inside a managed function, you can simply `require` it (similar to [here](https://github.com/graphcool/modules/blob/master/authentication/email-password/code/loggedInUser.js#L1)). In a webhook, you can install it as a dependency with npm.
Expand Down

0 comments on commit 28203a4

Please sign in to comment.