-
Notifications
You must be signed in to change notification settings - Fork 9
Add contribution guide and code of conduct #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2ff2c16
Update template wording and split wording from implementation guide
dondonz 25649d1
Add contribution guide and code of conduct
dondonz d5320bf
Add contributor license agreement
dondonz fef7368
Add versioning info
dondonz b52cc27
Clarify date format
dondonz d659908
Run Prettier
dondonz 9dd29b3
Fix typo
dondonz 60bac8b
Tidy up
dondonz 9959a84
Reference GraphQL Foundation Code of Conduct
dondonz 5f498cb
Change date format
dondonz 4efea8a
Add domain
dondonz f0919c9
Prettier format
dondonz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
# Contributor Code of Conduct | ||
|
||
Please review the GraphQL Foundation Code of Conduct at | ||
https://graphql.org/codeofconduct/. |
This file contains hidden or 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,3 +1,73 @@ | ||
# GraphQL Custom Scalars Specification Contribution Guide | ||
|
||
TODO | ||
Thanks for contributing to GraphQL Scalars. | ||
|
||
The goal of the GraphQL Scalars project is to provide a directory of GraphQL | ||
Custom Scalar specifications, contributed by the community. Contributed | ||
specifications will be hosted on a GraphQL Foundation owned domain | ||
https://scalars.graphql.org, which can be referenced with the built-in | ||
`@specifiedBy` GraphQL directive. | ||
|
||
GraphQL Custom Scalar specifications are language agnostic and thus can be used | ||
to document and standardize behavior across different languages. | ||
|
||
We will confirm the domain details soon. We are currently setting this up. | ||
|
||
Please ensure that you read the | ||
[Code of Conduct](https://graphql.org/codeofconduct/) before contributing to | ||
this project. | ||
|
||
## How to contribute | ||
|
||
1. Copy the `template-string.md` | ||
[template](https://github.com/graphql/graphql-scalars/blob/main/scalars/template-string.md) | ||
for Custom Scalars based on the built-in String Scalar, or otherwise use the | ||
`template.md` | ||
[template](https://github.com/graphql/graphql-scalars/blob/main/scalars/template.md) | ||
for all other Custom Scalars. Templates are located in the | ||
[graphql-scalars GitHub repository](https://github.com/graphql/graphql-scalars/tree/main/scalars). | ||
|
||
2. [Open a new pull request](https://github.com/graphql/graphql-scalars/pulls) | ||
for each Custom Scalar specification you would like to add. | ||
|
||
3. Modify your selected template, and save it in the correct place | ||
`scalars/contributed/<github-user-name>/<scalar-name>.md` in the | ||
[graphql-scalars GitHub repository](https://github.com/graphql/graphql-scalars/tree/main/scalars/contributed). | ||
The directory location is important, as this will form part of the reference | ||
URL for your specification. | ||
|
||
### Contributor License Agreement | ||
|
||
This repository is managed by EasyCLA. Project participants must sign the free | ||
[GraphQL Specification Membership agreement](https://preview-spec-membership.graphql.org) | ||
before making a contribution. You only need to do this one time, and it can be | ||
signed by | ||
[individual contributors](http://individual-spec-membership.graphql.org/) or | ||
their [employers](http://corporate-spec-membership.graphql.org/). | ||
|
||
To initiate the signature process please open a PR against this repo. The | ||
EasyCLA bot will block the merge if we still need a membership agreement from | ||
you. | ||
|
||
You can find | ||
[detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). | ||
If you have issues, please email | ||
[[email protected]](mailto:[email protected]). | ||
|
||
## Review process | ||
|
||
Your specification pull request will be reviewed by a maintainer of the | ||
[graphql-scalars repository](https://github.com/graphql/graphql-scalars). The | ||
maintainers will verify that the template has been completed, but note that the | ||
correctness of the specification is the responsibility of the original | ||
contributor. | ||
|
||
## Immutable specifications | ||
|
||
Specification semantics must not change, as specifications are publicly | ||
available reference documents. We will permit small edits which do not change | ||
specification semantics, such as typo fixes. | ||
|
||
A new version of a Custom Scalar specification should have a new scalar name, | ||
such as `<scalar-name>2`, `<scalar-name>3`, or a completely different name like | ||
OffsetDateTime is different to DateTime. |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -166,30 +166,3 @@ values for logically identical values. For example a `MyLocalDate` scalar could | |
accept the literals `"01-10-2022"` and `"01102022"` as input for the first of | ||
October 2022, but the result coercion should always return one of the possible | ||
representations. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved to template |
||
## Scalars specification outline | ||
|
||
A Scalars specification must clearly define the three observable aspects of a | ||
Scalar: | ||
|
||
1. The possible JSON result values | ||
|
||
2. The possible literal input values | ||
|
||
3. The possible JSON variable input values | ||
|
||
Provide positive and negative examples for each of the values. | ||
|
||
The Scalar should also be given a name. | ||
|
||
### Example implementation outline | ||
|
||
- Background | ||
|
||
- Naming recommendation | ||
|
||
- Valid values | ||
|
||
- Examples | ||
|
||
- References |
This file contains hidden or 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,6 +1,74 @@ | ||
# Guide to contribute a new Scalar | ||
# Custom Scalar specification contribution guide | ||
|
||
In order to contribute a new Scalar, please open a new PR for each new Scalar. | ||
Thanks for contributing to GraphQL Scalars. | ||
|
||
Copy either "template.md" or "template-string.md" and modify it. The new file | ||
should be under "scalars/contributed/<your-name>/<scalar-name>.md" | ||
The goal of the GraphQL Scalars project is to provide a directory of GraphQL | ||
Custom Scalar specifications, contributed by the community. Contributed | ||
specifications will be hosted on a GraphQL Foundation owned domain | ||
https://scalars.graphql.org, which can be referenced with the built-in | ||
`@specifiedBy` GraphQL directive. | ||
|
||
GraphQL Custom Scalar specifications are language agnostic and thus can be used | ||
to document and standardize behavior across different languages. | ||
|
||
The scalars will be hosted at https://scalars.graphql.org. We are currently | ||
setting this up. | ||
|
||
Please ensure that you read the | ||
[Code of Conduct](https://graphql.org/codeofconduct/) before contributing to | ||
this project. | ||
|
||
## How to contribute | ||
|
||
1. Copy the `template-string.md` | ||
[template](https://github.com/graphql/graphql-scalars/blob/main/scalars/template-string.md) | ||
for Custom Scalars based on the built-in String Scalar, or otherwise use the | ||
`template.md` | ||
[template](https://github.com/graphql/graphql-scalars/blob/main/scalars/template.md) | ||
for all other Custom Scalars. Templates are located in the | ||
[graphql-scalars GitHub repository](https://github.com/graphql/graphql-scalars/tree/main/scalars). | ||
|
||
2. [Open a new pull request](https://github.com/graphql/graphql-scalars/pulls) | ||
for each Custom Scalar specification you would like to add. | ||
|
||
3. Modify your selected template, and save it in the correct place | ||
`scalars/contributed/<github-user-name>/<scalar-name>.md` in the | ||
[graphql-scalars GitHub repository](https://github.com/graphql/graphql-scalars/tree/main/scalars/contributed). | ||
The directory location is important, as this will form part of the reference | ||
URL for your specification. | ||
|
||
### Contributor License Agreement | ||
|
||
This repository is managed by EasyCLA. Project participants must sign the free | ||
[GraphQL Specification Membership agreement](https://preview-spec-membership.graphql.org) | ||
before making a contribution. You only need to do this one time, and it can be | ||
signed by | ||
[individual contributors](http://individual-spec-membership.graphql.org/) or | ||
their [employers](http://corporate-spec-membership.graphql.org/). | ||
|
||
To initiate the signature process please open a PR against this repo. The | ||
EasyCLA bot will block the merge if we still need a membership agreement from | ||
you. | ||
|
||
You can find | ||
[detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). | ||
If you have issues, please email | ||
[[email protected]](mailto:[email protected]). | ||
|
||
## Review process | ||
|
||
Your specification pull request will be reviewed by a maintainer of the | ||
[graphql-scalars repository](https://github.com/graphql/graphql-scalars). The | ||
maintainers will verify that the template has been completed, but note that the | ||
correctness of the specification is the responsibility of the original | ||
contributor. | ||
|
||
## Immutable specifications | ||
|
||
Specification semantics must not change, as specifications are publicly | ||
available reference documents. We will permit small edits which do not change | ||
specification semantics, such as typo fixes. | ||
|
||
A new version of a Custom Scalar specification should have a new scalar name, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or just a completely different name like |
||
such as `<scalar-name>2`, `<scalar-name>3`, or a completely different name like | ||
OffsetDateTime is different to DateTime. |
This file contains hidden or 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,30 +1,33 @@ | ||
# This template is meant to be copied and modified | ||
|
||
# This template is meant for Scalars which are based on the build in String Scalar | ||
# This template is meant to be copied and modified. This template is meant for Scalars which are based on the built-in String Scalar | ||
|
||
# Custom Scalar spec \<name\> | ||
|
||
"Author:\<github user name\> " | ||
|
||
"Date: \<the date of the first publication\>" | ||
"Date: \<the date of the first publication in YYYY-MM-DD format\>" | ||
|
||
# Overview | ||
|
||
Provide an overview what this Scalar does and which | ||
Provide an overview of what this Scalar does and provide any background | ||
information. | ||
|
||
# Name | ||
|
||
Talk about the name and list alternatives, if available. | ||
Provide a recommended Scalar name and list alternatives, if available. | ||
|
||
# Result spec | ||
|
||
Define which Strings can be returned. | ||
|
||
Provide positive and negative examples of String return values. | ||
|
||
# Input spec | ||
|
||
Define which String values are accepted as input as GraphQL Literal and as JSON | ||
raw input. | ||
|
||
Provide positive and negative examples of literal and JSON raw input values. | ||
|
||
# References | ||
|
||
List external references, other background information etc. |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should reference here the general GraphQL code of conduct and not introduce a new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I'll reference https://graphql.org/codeofconduct/