https://github.com/git-hulk/gqlx
https://github.com/git-hulk/gqlx
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/git-hulk/gqlx
- Owner: git-hulk
- License: apache-2.0
- Created: 2025-06-29T13:14:36.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-06-29T13:26:52.000Z (12 months ago)
- Last Synced: 2025-06-29T14:25:22.093Z (12 months ago)
- Language: Go
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GQLX
A builder for GraphQL queries, mutations, and subscriptions. It's designed to
make the building process of GraphQL operations more intuitive and less error-prone.
NOTICE: this library is still in development and may change in the future.
## How to use
```Go
query := builder.Query().Name("user").
AddSelections(
NewField("id").Alias("user_id"),
NewField("name").AddArguments(
FromValue("age", value.Int(30)),
FromValue("var", value.Variable("var")),
FromType("sex", "Sex", nil),
FromType("status", "UserStatus", value.String("active")),
),
)
// query user {
// user_id: id
// name(age: 30, var: $var, sex: Sex, status: UserStatus = "active")
// }
queryString := query.String()
```
## License
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.