Skip to content
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

Add RTAC API #118

Merged
merged 1 commit into from
Aug 18, 2023
Merged

Add RTAC API #118

merged 1 commit into from
Aug 18, 2023

Conversation

thatbudakguy
Copy link
Member

@thatbudakguy thatbudakguy commented Aug 17, 2023

This is to hopefully get us faster performance for sul-dlss/sul-requests#1676, but we could also use it in SearchWorks to cut down on the overall number of endpoints we're hitting.

Try it out with:

query Query($instanceId: String) {
  availability(id: $instanceId) {
    dueDate
    status
    volume
    id
  }
}

Using:

{
  "instanceId": "b1e7f6b7-1fe5-5190-925b-f5dfcb54885b"
}

For this periodical in searchworks with many checked-out items.

README.md Outdated
@@ -26,6 +26,12 @@ Once the server is running, you can use the web interface to explore and build q
The GraphQL API is constructed based on FOLIO's published API schemas, in a process that involves several steps. In most cases, this pipeline will be automated for you and run when files are modified if you use the `start:dev` command. See `package.json` for commands that invoke the various steps in the pipeline separately.
### Schema
The schemas are generated from the RAML files published by FOLIO using a script in the `scripts` directory. The script corrects for some eccentricities in FOLIO's published JSON schemas, and then uses the [json-schema-to-graphql-types](https://github.com/lifeomic/json-schema-to-graphql-types) library to output a GraphQL schema to stdout.
#### Updating the FOLIO schemas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 Thanks for adding this documentation.

README.md Outdated
@@ -44,7 +50,7 @@ You can invoke the script with:
npm run update-graphql-schema
```
> **Warning**
> The library is currently not compatible with GraphQL v16, so you need to edit `node_modules/json-schema-to-graphql-types/src/converter.js` and make some changes in order to run the script. See the notes on PR #71 for details.
> The library is currently not compatible with GraphQL v16, so you need to edit `node_modules/@lifeomic/json-schema-to-graphql-types/src/converter.js` and make some changes in order to run the script. See the notes on PR #71 for details.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@thatbudakguy thatbudakguy force-pushed the rtac-api branch 3 times, most recently from c5238f0 to db1b1e2 Compare August 18, 2023 21:02
@thatbudakguy thatbudakguy marked this pull request as ready for review August 18, 2023 21:06
@thatbudakguy thatbudakguy requested a review from jcoyne August 18, 2023 21:06
@jcoyne jcoyne merged commit 2c4a6bb into main Aug 18, 2023
@jcoyne jcoyne deleted the rtac-api branch August 18, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants