{"id":13451765,"url":"https://github.com/americanexpress/nodes","last_synced_at":"2025-10-02T07:30:33.130Z","repository":{"id":37270869,"uuid":"132952801","full_name":"americanexpress/nodes","owner":"americanexpress","description":"A GraphQL JVM Client - Java, Kotlin, Scala, etc.","archived":true,"fork":false,"pushed_at":"2022-11-16T11:30:26.000Z","size":134,"stargazers_count":308,"open_issues_count":43,"forks_count":72,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-01-21T12:35:58.382Z","etag":null,"topics":["graphql","graphql-client","java","kotlin","scala"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/americanexpress.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-10T20:48:24.000Z","updated_at":"2024-11-19T16:17:19.000Z","dependencies_parsed_at":"2023-01-21T10:30:47.469Z","dependency_job_id":null,"html_url":"https://github.com/americanexpress/nodes","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/americanexpress/nodes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/americanexpress%2Fnodes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/americanexpress%2Fnodes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/americanexpress%2Fnodes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/americanexpress%2Fnodes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/americanexpress","download_url":"https://codeload.github.com/americanexpress/nodes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/americanexpress%2Fnodes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277974403,"owners_count":25908396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-02T02:00:08.890Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","graphql-client","java","kotlin","scala"],"created_at":"2024-07-31T07:01:01.794Z","updated_at":"2025-10-02T07:30:32.863Z","avatar_url":"https://github.com/americanexpress.png","language":"Java","readme":"# Nodes\n\u003e A GraphQL JVM Client - Java, Kotlin, Scala, etc.\n\n[![Build Status](https://travis-ci.org/americanexpress/nodes.svg)](https://travis-ci.org/americanexpress/nodes)\n[![Coverage Status](https://img.shields.io/coveralls/americanexpress/nodes.svg)](https://coveralls.io/github/americanexpress/nodes)\n[![Download](https://api.bintray.com/packages/americanexpress/maven/io.aexp.nodes.graphql/images/download.svg)](https://bintray.com/americanexpress/maven/io.aexp.nodes.graphql/_latestVersion)\n\nNodes is a GraphQL client designed for constructing queries from standard model definitions. Making\nthis library suitable for any JVM application that wishes to interface with a GraphQL service in a\nfamiliar way - a simple, flexible, compatible, adoptable, understandable library for everyone!\n\nThe Nodes library is intended to be used in a similar fashion to other popular API interfaces so \nthat application architecture can remain unchanged whether interfacing with a REST, SOAP, GraphQL, \nor any other API specification. A request entity is built for handling request specific parameters; \na template is used for executing that request and mapping the response to a response entity; a \nresponse entity is used to gather the results.\n\n## Installing\n\nCurrently the library is hosted on bintray. This can be added to your installation repositories as demonstrated below.\n\n_Maven_\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ebintray-americanexpress-maven\u003c/id\u003e\n        \u003curl\u003ehttps://dl.bintray.com/americanexpress/maven\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eio.aexp.nodes.graphql\u003c/groupId\u003e\n      \u003cartifactId\u003enodes\u003c/artifactId\u003e\n      \u003cversion\u003elatest\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n_Gradle_\n```\nrepositories {\n    maven {\n        url 'https://dl.bintray.com/americanexpress/maven/'\n    }\n}\n\ndependencies {\n    compile 'io.aexp.nodes.graphql:nodes:latest'\n}\n```\n\nReplace _latest_ with the desired version to install. The versions available for installing can be found in the git tags, using semantic versioning.\n\n## Usage\n\n```Java\nGraphQLTemplate graphQLTemplate = new GraphQLTemplate();\n\nGraphQLRequestEntity requestEntity = GraphQLRequestEntity.Builder()\n    .url(\"http://graphql.example.com/graphql\")\n    .variables(new Variable\u003c\u003e(\"timeFormat\", \"MM/dd/yyyy\"))\n    .arguments(new Arguments(\"path.to.argument.property\",\n        new Argument\u003c\u003e(\"id\", \"d070633a9f9\")))\n    .scalars(BigDecimal.class)\n    .request(SampleModel.class)\n    .build();\nGraphQLResponseEntity\u003cSampleModel\u003e responseEntity = graphQLTemplate.query(requestEntity, SampleModel.class);\n```\n\n### Annotations to configure fields\n\n#### `@GraphQLArgument(name=\"name\", value=\"defaultVal\", type=\"String\", optional=false)`\n\u003e Used above property fields\u003cbr\u003e\u003cb\u003ename (required)\u003c/b\u003e: GraphQL argument name\u003cbr\u003e\u003cb\u003evalue (optional)\u003c/b\u003e: default value to set the argument to\u003cbr\u003e\u003cb\u003etype (optional)\u003c/b\u003e: how to parse the optional value. Accepts an enum of \"String\", \"Boolean\", \"Integer\", or \"Float\" - defaults to be parsed as a string.\u003cbr\u003e\u003cb\u003eoptional (optional)\u003c/b\u003e: set to true if the value is optional and should be left out if value is null - defaults to false.\u003cbr\u003eYou can specify fields arguments directly inline using this. This is good for static field arguments such as result display settings, for instance the format of a date or the locale of a message.\n\n*example:*\n```java\n    ...\n    @GraphQLArgument(name=\"isPublic\", value=\"true\", type=\"Boolean\")\n    private User user;\n    ...\n```\n\n*result:*\n```\nquery {\n    ...\n    user(isPublic: true) {\n        ...\n```\n\n#### `@GraphQLArguments({@GraphQLArgument})`\n\u003e Used above property fields\u003cbr\u003eAnnotation for allowing mutliple default argument descriptions on one field\n\n*example:*\n```java\n    ...\n    @GraphQLArguments({\n        @GraphQLArgument(name=\"isPublic\", value=\"true\", type=\"Boolean\"),\n        @GraphQLArgument(name=\"username\")\n    })\n    private User user;\n    ...\n```\n\n*result:*\n```\nquery {\n    ...\n    user(isPublic: true, username: null) {\n        ...\n```\n\n#### `@GraphQLIgnore`\n\u003e Used above property fields\u003cbr\u003eAnnotation to ignore the field when constructing the schema\n\n*example:*\n```java\n    ...\n    @GraphQLIgnore\n    private User user;\n    ...\n```\n\n*result:*\n```\nquery {\n    ...\n```\n\n#### `@GraphQLProperty(name=\"name\", arguments={@GraphQLArgument(...)})`\n\u003e Used above property and class fields\u003cbr\u003e\u003cb\u003ename (required)\u003c/b\u003e: GraphQL schema field name, the property's field name will be used as the alias\u003cbr\u003e\u003cb\u003earguments (optional)\u003c/b\u003e: arguments for the specified graphQL schema.\u003cbr\u003eWhen used above property fields the annotation simply aliases that field, but when used above class fields it will replace the defined class name.\n\n*example:*\n```java\n    ...\n    @GraphQLProperty(name=\"myFavoriteUser\", arguments={\n        @GraphQLArgument(name=\"username\", value=\"amex\")\n    })\n    private User user;\n    ...\n```\n\n*result:*\n```\nquery {\n    ...\n    myFavoriteUser: user(username: \"amex\") {\n        ...\n```\n\n#### `@GraphQLVariable(name=\"name\", scalar=\"Float!\")`\n\u003e Used above property fields\u003cbr\u003e\u003cb\u003ename (required)\u003c/b\u003e: GraphQL variable name\u003cbr\u003e\u003cb\u003etype (required)\u003c/b\u003e: GraphQL scalar type. Including optional and required parsing (!)\u003cbr\u003eThis is good for sharing the same variables across multiple input parameters in a query.\n\n*example:*\n```java\n    ...\n    @GraphQLVariable(name=\"isPublic\", scalar=\"Boolean\")\n    private User user;\n    ...\n```\n\n*result:*\n```\nquery($isPublic: Boolean) {\n    ...\n    user(isPublic: $isPublic) {\n        ...\n```\n\n#### `@GraphQLVariables({@GraphQLVariable})`\n\u003e Used above property fields\u003cbr\u003eAnnotation for allowing mutliple variables for a given field.\n\n*example:*\n```java\n    ...\n    @GraphQLVariables({\n        @GraphQLVariable(name=\"isPublic\", scalar=\"Boolean\"),\n        @GraphQLVariable(name=\"username\", scalar=\"String!\")\n    })\n    private User user;\n    ...\n```\n\n*result:*\n```\nquery($isPublic: Boolean, $username: String!) {\n    ...\n    user(isPublic: $isPublic, username: $username) {\n        ...\n```\n\n## Terminology\n\nAll language found in this library is aimed to align with the language used in the GraphQL\nspecification. An example of this is GraphQL vs GraphQl, where in this library the GraphQL\nspecification is favored over the Java standard.\n\n----------\n\n## Contributing\nWe welcome Your interest in the American Express Open Source Community on Github.\nAny Contributor to any Open Source Project managed by the American Express Open\nSource Community must accept and sign an Agreement indicating agreement to the\nterms below. Except for the rights granted in this Agreement to American Express\nand to recipients of software distributed by American Express, You reserve all\nright, title, and interest, if any, in and to Your Contributions. Please [fill\nout the Agreement](https://cla-assistant.io/americanexpress/nodes).\n\nPlease feel free to open pull requests and see [CONTRIBUTING.md](./CONTRIBUTING.md) for commit formatting details.\n\n## License\nAny contributions made under this project will be governed by the [Apache License 2.0](./LICENSE.txt).\n\n## Code of Conduct\nThis project adheres to the [American Express Community Guidelines](./CODE_OF_CONDUCT.md). By participating, you are\nexpected to honor these guidelines.\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famericanexpress%2Fnodes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famericanexpress%2Fnodes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famericanexpress%2Fnodes/lists"}