-
Notifications
You must be signed in to change notification settings - Fork 835
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
Change to use declarative types with @graphql-tools/schema #362
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @salma-bek,
Please solve the merge conflicts so that we can merge this change.
const getBooks = async (SEARCH_URL) => { | ||
import { makeExecutableSchema } from 'graphql-tools-schema'; | ||
import 'mle-js-fetch'; | ||
import oracledb from 'mle-js-oracledb'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might no longer be necessary to import oracledb. Instead of
const connection = oracledb.defaultConnection();
const result = connection.execute()
you can simply reference the session
object in the global scope. This will make it easier later on to bundle the code. Unless of course something else in the oracledb
namespace is needed that MLE doesn't provide in the global scope.
}, | ||
Book: { | ||
stock: async (book) => { | ||
const conn = oracledb.defaultConnection(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please consider using session.execute()
here.
}, | ||
}; | ||
|
||
const getBooks = async (SEARCH_URL) => { | ||
const conn = oracledb.defaultConnection(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please consider using session.execute()
instead
`); | ||
|
||
const response = await fetch(`${BASE_URL}${SEARCH_URL}`, { credentials: "include" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beginning with Oracle Database 23.3 it should no longer be necessary to use createntials: include
In addition to the comments in the code, please add instructions how to use rollup to generate a bundle of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly address the outstanding comments and resubmit the code for review
The purpose of this PR is to use declarative types with @graphql-tools/schema instead of GraphQL’s reference implementation