mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
35d9c059db
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9420 Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com> GitOrigin-RevId: 31d983ae8573c91ac5bf11066770f776941c3a11 |
||
---|---|---|
.. | ||
evaluation | ||
fixtures | ||
authentication.test.ts.disable | ||
cloudfunction.test.ts | ||
docusign.test.ts | ||
example_api2_server.js | ||
example_api2.test.ts | ||
example_api3_server.js | ||
example_api3.test.ts | ||
example_api4.test.ts.disable | ||
example_api5_server.js | ||
example_api5.test.ts | ||
example_api6_server.js | ||
example_api6.test.ts | ||
example_api7_server.js.disable | ||
example_api7.test.ts.disable | ||
example_api_server.js | ||
example_api.test.ts.disable | ||
example_gql_server_ws.js | ||
example_gql_server.js | ||
extensions.test.ts | ||
file_upload_api_server.js.disable | ||
file_upload.test.ts.disable | ||
government_social_work.test.ts | ||
ibm_language_translator.test.ts.disable | ||
instagram.test.ts.disable | ||
oas_3_tools.test.ts | ||
petstore31.test.ts | ||
README.md | ||
stripe.test.ts | ||
trello.test.ts | ||
weather_underground.test.ts |
Tests
We have a number of test suites used to verify the behavior of OpenAPI-to-GraphQL.
Tests against real-world APIs
The following test suites perform a simple wrapping test and do not make call against any of the respective APIs.
API | Test file |
---|---|
N/A | cloudfunction.test.ts |
DocuSign | docusign.test.ts |
N/A | government_social_work.test.ts |
IBM Language Translator | ibm_language_translator.test.ts |
instagram.test.ts |
|
Stripe | stripe.test.ts |
Weather Underground | weather_underground_test.ts |
Tests against custom APIs
We have created a number of example APIs for finer grain testing. Unfortunately, for a number of reasons including difficulty keeping tests on theme and some tests requiring their own specialized APIs, the number of tests have quickly grown and do not have meaningful identifiers.
The following table summarizes the purposes of these tests.
Test file | API(s) | Testing purpose |
---|---|---|
example_api.test.ts |
Example API |
An assortment of basic functionality and options on a company-themed API |
authentication.test.ts |
Example API |
Basic authentication tests including using the viewer functionality |
example_api2.test.ts |
Example API 2 |
The operationIdFieldNames option |
example_api3.test.ts |
Example API and Example API 3 |
Creating GraphQL wrappers from multiple APIs and interOAS links |
example_api4.test.ts |
Example API 4 |
JSON schema combining schema keywords |
example_api5.test.ts |
Example API 5 |
The simpleNames option |
example_api6.test.ts |
Example API 6 |
An assortment of other functionality and options |
example_api7.test.ts |
Example API 7 |
Subscription support |
file_upload.test.ts |
File Upload API |
File uploads and file upload options |
extensions.test.ts |
Extensions , Extensions Error 1 , Extensions Error 2 , Extensions Error 3 , Extensions Error 4 , Extensions Error 5 , Extensions Error 6 , Extensions Error 7 |
The x-graphql-field-name , x-graphql-type-name , and x-graphql-enum-mapping extensions |