-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
988117b
commit 4eea1b8
Showing
11 changed files
with
73 additions
and
74 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Fire GraphQL", | ||
"position": 2 | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Vulcan Fire | ||
|
||
## In a nutshell | ||
|
||
In Roman mythology, Vulcan is Apollo's Brother and god of fire. | ||
That's why _Vulcan Fire_ completes _Apollo GraphQL_ so well! | ||
|
||
[Apollo GraphQL](https://www.apollographql.com/) provides a way to easily setup GraphQL in JavaScript applications, server-side and client-side. | ||
|
||
**Vulcan Fire** is a toolkit to be more productive with Apollo. | ||
Fire powers our staters, [Vulcan Next](../vulcan-next) and [Vulcan Express](../vulcan-express/). | ||
|
||
Go go to the next page to learn more. |
11 changes: 6 additions & 5 deletions
11
...rus/docs/vulcan-artemis/outsideGraphql.md → ...saurus/docs/vulcan-fire/outsideGraphql.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
--- | ||
title: Outside GraphQL | ||
--- | ||
# Reuse Artemis logic in an Express endpoint | ||
|
||
Artemis core logic doesn't really depend on GraphQL. | ||
# Reuse Fire logic in an Express endpoint | ||
|
||
Fire core logic doesn't really depend on GraphQL. | ||
|
||
`mutator` functions are actually reusable in any Express application in a few easy steps. | ||
They are exposed by the `@vulcanjs/crud/server` package. | ||
|
||
In an Express middleware: | ||
|
||
- Call `createMutator`, `updateMutator` or `deleteMutator` (check API docs for their full). | ||
You'll need to pass the `currentUser`. If there is no current user, for instance if you use a mutator | ||
in a seed script, instead use the `asAdmin` option and the `validate` option. | ||
You'll need to pass the `currentUser`. If there is no current user, for instance if you use a mutator | ||
in a seed script, instead use the `asAdmin` option and the `validate` option. | ||
|
||
You can optionnaly pass the GraphQL context to a mutator, though it should not be needed anymore: | ||
|
||
- Optionnaly generate the `context`. This is the same context that is used in GraphQL resolvers. This concept is less common outside of the GraphQL ecosystem, but still perfectly relevant. | ||
- Generate `dataSources` as well | ||
- Then you can use a `mutator` as you would do when creating a custom resolver, and pass it the `context` and `dataSources`. | ||
- Then you can use a `mutator` as you would do when creating a custom resolver, and pass it the `context` and `dataSources`. |
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
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
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