Skip to content

Commit

Permalink
Merge branch 'master' into fuzzy_query_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelnikolov committed Apr 3, 2024
2 parents 3df64df + 6029c30 commit ed646a8
Show file tree
Hide file tree
Showing 125 changed files with 17,217 additions and 7,667 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '16 17 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
32 changes: 32 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
run:
timeout: 5m

linters-settings:
gofmt:
simplify: true
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
- deepequalerrors # remove later

linters:
disable-all: true
enable:
- gofmt
- gosimple
- govet
- ineffassign
- exportloopref
- staticcheck
- unconvert
- unused
- misspell
- goimports

issues:
exclude-rules:
- linters:
- unused
path: "graphql_test.go"
56 changes: 35 additions & 21 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
version: v1.0
name: Go
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
blocks:
- name: Test
task:
jobs:
- name: go test
commands:
- sem-version go 1.17
- export GO111MODULE=on
- export GOPATH=~/go
- 'export PATH=/home/semaphore/go/bin:$PATH'
- checkout
- go version
- go get ./...
- go test ./...
- go build -v .
version: v1.0
name: Go
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
blocks:
- name: Style Check
task:
jobs:
- name: fmt
commands:
- sem-version go 1.20
- checkout
- ./scripts/golangci_install.sh -b $(go env GOPATH)/bin v1.51.0
- export PATH=$(go env GOPATH)/bin:$PATH
- golangci-lint run ./...

- name: Test & Build
task:
prologue:
commands:
- sem-version go 1.20
- export PATH=$(go env GOPATH)/bin:$PATH
- checkout
- go version

jobs:
- name: Test
commands:
- go test ./...

- name: Build
commands:
- go build -v .
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
CHANGELOG

[v1.5.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.5.0) Release v1.5.0
* [FEATURE] Add specifiedBy directive in #532
* [IMPROVEMENT] In this release we improve validation for primitive values, directives, repeat directives, #515, #516, #525, #527
* [IMPROVEMENT] Fix minor unreachable code caused by t.Fatalf #530
* [BUG] Fix __type queries sometimes not returning data in #540
* [BUG] Allow deprecated directive on arguments by @pavelnikolov in #541
* [DOCS] Add array input example #536


[v1.4.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.4.0) Release v1.4.0
* [FEATURE] Add basic first step for Apollo Federation. This does NOT include full subgraph specification. This PR adds support only for `_service` schema level field. This library is long way from supporting the full sub-graph spec and we do not plan to implement that any time soon.


[v1.3.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.3.0) Release v1.3.0
* [FEATURE] Support custom panic handler #468
* [FEATURE] Support interfaces implementing interfaces #471
* [BUG] Support parsing nanoseconds time properly #486
* [BUG] Fix a bug in maxDepth fragment spread logic #492


[v1.2.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.2.0) Release v1.2.0
* [DOCS] Added examples of how to add JSON map as input scalar type. The goal of this change was to improve documentation #467


[v1.1.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.1.0) Release v1.1.0
* [FEATURE] Add types package #437
* [FEATURE] Expose `packer.Unmarshaler` as `decode.Unmarshaler` to the public #450
* [FEATURE] Add location fields to type definitions #454
* [FEATURE] `errors.Errorf` preserves original error similar to `fmt.Errorf` #456
* [BUGFIX] Fix duplicated __typename in response (fixes #369) #443


[v1.0.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.0.0) Initial release
59 changes: 59 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## Community Code of Conduct

### Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering
an open and welcoming community, we pledge to respect all people who contribute
through reporting issues, posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.

We are committed to making participation in the GraphQL Go community a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.

## Scope

This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.

## Our Standards

Examples of behavior that contributes to a positive environment include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct.
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect
of managing this project.
Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.

## Reporting

For incidents occurring in the Graph Gophers community, contact @pavelnikolov in [the Gophers Slack](https://gophers.slack.com/) or alternatively you can contact me [at] pavelnikolov [dot] net. You can expect a response within few business days.

## Enforcement

The Graph Gophers maintainers enforce code of conduct issues for the graphql-go project as well other projects under the graph-gophers github organization.

We try to resolve incidents without punishment, but may remove people from the project at our discretion.

## Acknowledgements

This Code of Conduct is adapted from the Contributor Covenant
(http://contributor-covenant.org), version 2.0 available at
http://contributor-covenant.org/version/2/0/code_of_conduct/
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
- Your pull request should have no more than two commits, if not you should squash them.
- It should pass all tests in the available continuous integrations systems such as TravisCI.
- You should add/modify tests to cover your proposed code changes.
- If your pull request contains a new feature, please document it on the README.
- If your pull request contains a new feature, please document it well:
* Consider adding Go executable examples
* Comment all new exported types if outside of the `internal` package
* (optional) Mention it in the README
* Add a comment in the CHANGELOG.md explaining your feature

0 comments on commit ed646a8

Please sign in to comment.