# GraphQL

The Spydra Hyperledger Fabric Base Contract has various utility methods which provide additional functionalities out of the box to any Chaincode that is deployed in a Spydra blockchain network. Simply extend your own Chaincode Smart Contract from the Spydra Base Contract to get these additional features.

Query the world state using GraphQL. For more details, refer to [GraphQL](/products-overview/private-network/graphql.md)

### Golang

1. Run `go get`

```
$ go get -u github.com/spydra-tech/fabric-contract-go/spydracontract
```

2. Extend your Smart Contract from the Spydra Base Contract

```
type MyCustomContract struct {
    spydracontract.BaseContract
}
```

3. [Deploy](https://docs.spydra.app/how-to/apps/deploy-app) the Chaincode on a Spydra Blockchain network and start querying on any attribute using [Graph QL](https://docs.spydra.app/products-overview/graphql).

{% embed url="<https://pkg.go.dev/github.com/spydra-tech/fabric-contract-go#section-readme>" %}

### NodeJS

1. Install spydra-fabric-contract-node&#x20;

from npm

```
$ npm install --save spydra-fabric-contract-node
```

or using yarn:

```
$ yarn add spydra-fabric-contract-node
```

2. Extend your Smart Contract from the Spydra Base Contract.

```
class MyCustomContract extends SpydraContract {
}
```

3. [Deploy](https://docs.spydra.app/how-to/apps/deploy-app) the Chaincode on a Spydra Blockchain network and start querying on any attribute using [Graph QL](https://docs.spydra.app/products-overview/graphql).

{% embed url="<https://www.npmjs.com/package/spydra-fabric-contract-node>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spydra.app/developers/api-reference/custom-chaincode/graphql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
