GraphQL - Coursera - pr1 Flashcards
Which of the following modules allows cross-origin requests in ExpressJS?
cors
graphql-depth-limit
express-graphql
graphql
cors
We used several type definitions in our schema in this class. Which of the following is not a valid GraphQL schema?
object definitions
mutation
query
callback functions
callback functions
The part of the ExpressJS code that resolves a request to the actual data to be returned is called the:
schema
listener
port
resolver
resolver
Which of the following is a way to deter malicious query to be submitted and executed on the server?
Use faster server hardware
Use Linux for the server.
Use a web service to host the server
Limit query depth
Limit query depth
What can we do if we don’t want to convert a JSON object to the schema to be returned?
- Use XML instead
- Stringify the JSON object and serialize it.
- Make the schema and the JSON object use the same signature, then we can just return the JSON object.
- Use https instead of http.
Make the schema and the JSON object use the same signature, then we can just return the JSON object.
Which of the following code binds the schema to the resolver rootValue?
app. use(“/”, { schema: rootValue } ) );
app. use(“/”, (req, res) => { schema, rootValue } ;
app. use(“/”, schema, rootValue);
app. use(“/”, graphqlHTTP( { schema, rootValue } ) );
app.use(“/”, graphqlHTTP( { schema, rootValue } ) );