System and method for customized graphQL data-handling scripts

US11720532B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11720532-B2
Application numberUS-202117457867-A
CountryUS
Kind codeB2
Filing dateDec 6, 2021
Priority dateFeb 6, 2020
Publication dateAug 8, 2023
Grant dateAug 8, 2023

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

The present disclosure is directed to a modified GraphQL server that enables application developers to define custom GraphQL schema fragments. For example, a developer may provide the GraphQL server with a GraphQL standard definition language (SDL) file having annotations that indicate that a customized data-handling script, such as a custom data-fetching script or a custom type resolver script, be called for handling certain data types or fields. These customized data-handling scripts are resolved and called at runtime based on the annotations in the GraphQL SDL file. By enabling developers to define schema fragments in the SDL language and implement data-handling scripts in a suitable scripting language, schema portability can be maintained across client instances, as well as instance release versions. Additionally, the disclosed approach enables enhanced modularity and reuse of previously defined data types and data-handling scripts, which increases developer productivity and reduces errors during application development.

First claim

Opening claim text (preview).

The invention claimed is: 1. A system, comprising: a GraphQL server comprising a processor and a memory, wherein the GraphQL server is configured to perform actions comprising: generating a partial GraphQL schema from a GraphQL standard definition language (SDLP) file, wherein the GraphQL SDL file includes an annotation indicating that a particular data-handling script is dynamically resolved and executed when a particular field or a particular type of the partial GraphQL schema is referenced; receiving a GraphQL query that references the particular field or the particular type of the partial GraphQL schema; executing the GraphQL query to generate GraphQL results, wherein executing the GraphQL query comprises dynamically resolving the particular data-handling script based on the annotation in the GraphQL SDL file and dynamically executing the particular data-handling script to retrieve information associated with the particular field or the particular type; and providing the GraphQL results in response to the GraphQL query. 2. The system of claim 1 , wherein, to dynamically execute the particular data-handling script, the GraphQL server is configured to perform actions comprising: calling a runtime interpreter that dynamically evaluates the particular data-handling script to retrieve the information associated with the particular field or the particular type during execution of the GraphQL query. 3. The system of claim 1 , wherein, to generate the partial GraphQL schema, the GraphQL server is configured to perform actions comprising: analyzing the GraphQL SDL file to identify the annotation; and in response to determining that the particular data-handling script has not been defined, creating a template for the particular data-handling script indicated by the annotation. 4. The system of claim 1 , wherein the GraphQL SDL file includes a second annotation indicating that a second particular data-handling script is dynamically resolved and executed when a second particular field or a second particular type of the partial GraphQL schema is referenced, and wherein, to execute the GraphQL query, the GraphQL server is configured to perform actions comprising: dynamically resolving the second particular data-handling script based on the second annotation in the GraphQL SDL file; and dynamically executing the second particular data-handling script to retrieve information associated with the second particular field or the second particular type. 5. The system of claim 4 , wherein, to generate the partial GraphQL schema, the GraphQL server is configured to perform actions comprising: analyzing the GraphQL SDL file to identify the second annotation; and in response to determining that the second particular data-handling script has not been defined, creating a second template for the second particular data-handling script indicated by the second annotation, wherein the particular data-handling script is a data fetcher script and the second particular data-handling script is a type resolver script. 6. The system of claim 1 , wherein, after generating the partial GraphQL schema, the GraphQL server is configured to perform actions comprising: caching the particular data-handling script; receiving a request to modify the GraphQL SDL file or the particular data-handling script; and in response to receiving the request, modifying the GraphQL SDL file or the particular data-handling script and then flushing and re-caching the particular data-handling script. 7. The system of claim 1 , wherein the system comprises a database server communicatively coupled to the GraphQL server and configured to store a standard definition language (SDL) table and a data-handling script table, and wherein, to generate the partial GraphQL schema, the GraphQL server is configured to perform actions comprising: receiving and storing the GraphQL SDL file in the SDL table; and in response to determining that the particular data-handling script has not been defined in the data-handling script table, creating a template for the particular data-handling script indicated by the annotation in the data-handling script table. 8. The system of claim 1 , wherein, to generate the partial GraphQL schema, the GraphQL server is configured to perform actions comprising: compiling the GraphQL SDL file into a plurality of SDL files defining an overall GraphQL schema of the GraphQL server; and generating the overall GraphQL schema that includes the partial GraphQL schema. 9. A method of operating a GraphQL server, comprising: generating a partial GraphQL schema from a GraphQL standard definition language (SDLP) file, wherein the GraphQL SDL file includes an annotation indicating a particular data-handling script for a particular field or a particular type of the partial GraphQL schema; receiving a GraphQL query that references the particular field or the particular type of the partial GraphQL schema; executing the GraphQL query to generate GraphQL results, wherein executing the GraphQL query comprises dynamically resolving the particular data-handling script based on the annotation in the GraphQL SDL file and dynamically executing the particular data-handling script to retrieve information associated with the particular field or the particular type; and providing the GraphQL results in response to the GraphQL query. 10. The method of claim 9 , wherein, before generating the partial GraphQL schema, the method comprises: receiving the GraphQL SDL file from a communicatively coupled client device; and storing the GraphQL SDL file in a first table of a database server that is communicatively coupled to the GraphQL server. 11. The method of claim 10 , wherein generating the partial GraphQL schema comprises: in response to determining that the particular data-handling script has not been defined in a second table of the database server, creating a template for the particular data-handling script indicated by the annotation in the second table. 12. The method of claim 9 , wherein, after generating the partial GraphQL schema and before receiving the GraphQL query, the method comprises: caching the particular data-handling script; and in response to a determining that the GraphQL SDL file or the particular data-handling script has been modified, flushing and re-caching the particular data-handling script. 13. The method of claim 9 , wherein dynamically executing the particular data-handling script comprises: calling a runtime interpreter that dynamically evaluates the particular data-handling script to retrieve the information associated with the particular field or the particular type during execution of the GraphQL query. 14. The method of claim 9 , wherein the GraphQL SDL file includes a second annotation indicating that a second particular data-handling script is dynamically resolved and executed when a second particular field or a second particular type of the partial GraphQL schema is referenced, and wherein, to generate the partial GraphQL schema, the GraphQL server is configured to perform actions comprising: analyzing the GraphQL SDL file to identify the second annotation; and in response to determining that the second particular data-handling script has not been defined, creating a second template for the second particular data-handling script indicated by the second annotation. 15. The method of claim 14 , wherein the particular data-handling script is a type resolver script and the second particular data-handling script is a data fetcher script. 16. The method of claim 14 , wherein executing the GraphQL que

Assignees

Inventors

Classifications

  • G06F16/211Primary

    Schema design and management · CPC title

  • Remote procedure calls [RPC]; Web services · CPC title

  • Tablespace storage structures; Management thereof · CPC title

  • Query languages · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11720532B2 cover?
The present disclosure is directed to a modified GraphQL server that enables application developers to define custom GraphQL schema fragments. For example, a developer may provide the GraphQL server with a GraphQL standard definition language (SDL) file having annotations that indicate that a customized data-handling script, such as a custom data-fetching script or a custom type resolver script…
Who is the assignee on this patent?
Servicenow Inc
What technology area does this patent fall under?
Primary CPC classification G06F16/211. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Aug 08 2023 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 12 related publications on this page (citations in our corpus or others sharing the same primary CPC).