<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.23.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>114</ContextCount>
  <ElementCount>237</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>34</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>8</UnitCount>
  <MyReports>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00100 - Statement - BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/StatementBalanceSheets</Role>
      <ShortName>BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00105 - Statement - BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/StatementBalanceSheetsParenthetical</Role>
      <ShortName>BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00200 - Statement - STATEMENTS OF OPERATIONS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/StatementStatementsOfOperations</Role>
      <ShortName>STATEMENTS OF OPERATIONS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00300 - Statement - STATEMENTS OF CHANGES IN STOCKHOLDERS' DEFICIT</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/StatementStatementsOfChangesInStockholdersDeficit</Role>
      <ShortName>STATEMENTS OF CHANGES IN STOCKHOLDERS' DEFICIT</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00400 - Statement - STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/StatementStatementsOfCashFlows</Role>
      <ShortName>STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>10101 - Disclosure - Description of Organization and Business Operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureDescriptionOfOrganizationAndBusinessOperations</Role>
      <ShortName>Description of Organization and Business Operations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>10201 - Disclosure - Restatement of Previously Issued Financial Statements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureRestatementOfPreviouslyIssuedFinancialStatements</Role>
      <ShortName>Restatement of Previously Issued Financial Statements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>10301 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureBasisOfPresentationAndSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>10401 - Disclosure - Initial Public Offering</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureInitialPublicOffering</Role>
      <ShortName>Initial Public Offering</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>10501 - Disclosure - Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureRelatedPartyTransactions</Role>
      <ShortName>Related Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>10601 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>10701 - Disclosure - Common Stock Subject to Possible Redemption</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureCommonStockSubjectToPossibleRedemption</Role>
      <ShortName>Common Stock Subject to Possible Redemption</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>10801 - Disclosure - Stockholders' Deficit</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureStockholdersDeficit</Role>
      <ShortName>Stockholders' Deficit</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>10901 - Disclosure - Warrants</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureWarrants</Role>
      <ShortName>Warrants</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>11001 - Disclosure - Fair Value of Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureFairValueOfMeasurements</Role>
      <ShortName>Fair Value of Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>11101 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>11201 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureSubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>20302 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureBasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureBasisOfPresentationAndSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>19</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>30203 - Disclosure - Restatement of Previously Reported Balance Sheet (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureRestatementOfPreviouslyReportedBalanceSheetTables</Role>
      <ShortName>Restatement of Previously Reported Balance Sheet (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>30703 - Disclosure - Common Stock Subject to Possible Redemption (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureCommonStockSubjectToPossibleRedemptionTables</Role>
      <ShortName>Common Stock Subject to Possible Redemption (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureCommonStockSubjectToPossibleRedemption</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>31003 - Disclosure - Fair Value of Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureFairValueOfMeasurementsTables</Role>
      <ShortName>Fair Value of Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureFairValueOfMeasurements</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>31103 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureIncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureIncomeTaxes</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>40101 - Disclosure - Description of Organization and Business Operations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureDescriptionOfOrganizationAndBusinessOperationsDetails</Role>
      <ShortName>Description of Organization and Business Operations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureDescriptionOfOrganizationAndBusinessOperations</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>40201 - Disclosure - Restatement of Previously Issued Financial Statements - Statements of Operations (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureRestatementOfPreviouslyIssuedFinancialStatementsStatementsOfOperationsDetails</Role>
      <ShortName>Restatement of Previously Issued Financial Statements - Statements of Operations (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>40202 - Disclosure - Restatement of Previously Issued Financial Statements - Statement of Changes in Stockholders' Deficit (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureRestatementOfPreviouslyIssuedFinancialStatementsStatementOfChangesInStockholdersDeficitDetails</Role>
      <ShortName>Restatement of Previously Issued Financial Statements - Statement of Changes in Stockholders' Deficit (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>40203 - Disclosure - Restatement of Previously Issued Financial Statements - Statement of Cash Flows (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureRestatementOfPreviouslyIssuedFinancialStatementsStatementOfCashFlowsDetails</Role>
      <ShortName>Restatement of Previously Issued Financial Statements - Statement of Cash Flows (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>40301 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureBasisOfPresentationAndSummaryOfSignificantAccountingPoliciesDetails</Role>
      <ShortName>Basis of Presentation and Summary of Significant Accounting Policies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureBasisOfPresentationAndSummaryOfSignificantAccountingPoliciesPolicies</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>40401 - Disclosure - Initial Public Offering (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureInitialPublicOfferingDetails</Role>
      <ShortName>Initial Public Offering (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureInitialPublicOffering</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>40501 - Disclosure - Related Party Transactions - Founder Shares (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureRelatedPartyTransactionsFounderSharesDetails</Role>
      <ShortName>Related Party Transactions - Founder Shares (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>40502 - Disclosure - Related Party Transactions - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureRelatedPartyTransactionsAdditionalInformationDetails</Role>
      <ShortName>Related Party Transactions - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>40601 - Disclosure - Commitments and Contingencies (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureCommitmentsAndContingenciesDetails</Role>
      <ShortName>Commitments and Contingencies (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureCommitmentsAndContingencies</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>40701 - Disclosure - Common Stock Subject to Possible Redemption (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureCommonStockSubjectToPossibleRedemptionDetails</Role>
      <ShortName>Common Stock Subject to Possible Redemption (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureCommonStockSubjectToPossibleRedemptionTables</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>40702 - Disclosure - Common Stock Subject to Possible Redemption - The condensed balance sheet (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureCommonStockSubjectToPossibleRedemptionCondensedBalanceSheetDetails</Role>
      <ShortName>Common Stock Subject to Possible Redemption - The condensed balance sheet (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>40801 - Disclosure - Stockholders' Deficit - Preferred stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureStockholdersDeficitPreferredStockDetails</Role>
      <ShortName>Stockholders' Deficit - Preferred stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>40802 - Disclosure - Stockholders' Deficit - Common Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureStockholdersDeficitCommonStockDetails</Role>
      <ShortName>Stockholders' Deficit - Common Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>40901 - Disclosure - Warrants (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureWarrantsDetails</Role>
      <ShortName>Warrants (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.grafacq.com/role/DisclosureWarrants</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>41001 - Disclosure - Fair Value of Measurements - Assets and liabilities that are measured at fair value on a recurring basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureFairValueOfMeasurementsAssetsAndLiabilitiesThatAreMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair Value of Measurements - Assets and liabilities that are measured at fair value on a recurring basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>41002 - Disclosure - Fair Value of Measurements - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureFairValueOfMeasurementsAdditionalInformationDetails</Role>
      <ShortName>Fair Value of Measurements - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>41003 - Disclosure - Fair Value of Measurements - Quantitative information regarding Level 3 fair value measurements inputs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureFairValueOfMeasurementsQuantitativeInformationRegardingLevel3FairValueMeasurementsInputsDetails</Role>
      <ShortName>Fair Value of Measurements - Quantitative information regarding Level 3 fair value measurements inputs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>41004 - Disclosure - Fair Value of Measurements - Change in the fair value of the derivative warrant liabilities, measured using Level 3 inputs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureFairValueOfMeasurementsChangeInFairValueOfDerivativeWarrantLiabilitiesMeasuredUsingLevel3InputsDetails</Role>
      <ShortName>Fair Value of Measurements - Change in the fair value of the derivative warrant liabilities, measured using Level 3 inputs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>41101 - Disclosure - Income Taxes - Components of income tax provision (benefit) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureIncomeTaxesComponentsOfIncomeTaxProvisionBenefitDetails</Role>
      <ShortName>Income Taxes - Components of income tax provision (benefit) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>41102 - Disclosure - Income Taxes - Company's net deferred tax assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureIncomeTaxesCompanySNetDeferredTaxAssetsDetails</Role>
      <ShortName>Income Taxes - Company's net deferred tax assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="gfor-20221231xs4.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>41103 - Disclosure - Income Taxes - Effective income tax rate reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.grafacq.com/role/DisclosureIncomeTaxesEffectiveIncomeTaxRateReconciliationDetails</Role>
      <ShortName>Income Taxes - Effective income tax rate reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <Logs>
    <Log type="Warning">[dq-0542-Deprecated-Concept] Concept RelatedPartyTransactionSellingGeneralAndAdministrativeExpensesFromTransactionsWithRelatedParty in us-gaap/2022 used in 2 facts was deprecated in us-gaap/2023 as of 2023 and should not be used. gfor-20221231xs4.htm 330</Log>
    <Log type="Warning">[dq-0542-Deprecated-Concept] Concept DueToRelatedPartiesCurrent in us-gaap/2022 used in 2 facts was deprecated in us-gaap/2023 as of 2023 and should not be used. gfor-20221231xs4.htm 344</Log>
    <Log type="Warning">[dq-0542-Deprecated-Concept] Concept RelatedPartyTransactionExpensesFromTransactionsWithRelatedParty in us-gaap/2022 used in 2 facts was deprecated in us-gaap/2023 as of 2023 and should not be used. gfor-20221231xs4.htm 344</Log>
    <Log type="Warning">[dq-0542-Deprecated-Concept] Concept NotesPayableRelatedPartiesCurrentAndNoncurrent in us-gaap/2022 used in 2 facts was deprecated in us-gaap/2023 as of 2023 and should not be used. gfor-20221231xs4.htm 344</Log>
    <Log type="Warning">[ix-0514-Hidden-Fact-Eligible-For-Transform] WARN: 33 fact(s) appearing in ix:hidden were eligible for transformation: gfor:FairValueAssetsLevel1ToLevel2TransfersAmount1, gfor:FairValueAssetsLevel2ToLevel1TransfersAmount1, gfor:NumberOfWarrantsIssuedPerUnit, gfor:PeriodOfOptionToPurchaseAdditionalUnitsForUnderwriter, us-gaap:CommonStockSharesOutstanding, us-gaap:EarningsPerShareDiluted, us-gaap:FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetTransfersNet, us-gaap:IncomeTaxExpenseBenefit, us-gaap:PreferredStockSharesOutstanding, us-gaap:WeightedAverageNumberOfDilutedSharesOutstanding -  gfor-20221231xs4.htm 9</Log>
    <Log type="Warning">[ix-0514-Hidden-Fact-Not-Referenced] WARN: 2 fact(s) appearing in ix:hidden were not referenced by any -sec-ix-hidden style property: us-gaap:CommitmentsAndContingencies -  gfor-20221231xs4.htm 9</Log>
    <Log type="Warning">[DQC.US.0057.7494] One of the following elements Cash, CashAndCashEquivalentsAtCarryingValue, CashAndCashEquivalentsAtCarryingValueIncludingDiscontinuedOperations, CashAndDueFromBanks, CashCashEquivalentsAndFederalFundsSold, CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents, CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations, CashEquivalentsAtCarryingValue should appear as the opening and closing balance in the cash flow statement using the group http://www.grafacq.com/role/DisclosureRestatementOfPreviouslyIssuedFinancialStatementsStatementOfCashFlowsDetails. Instead the following balance items have been used in this statement . Depending if ASU-2016-18 has been adopted at least one of the opening and closing balance items listed must be used in the cash flow statement. - </Log>
    <Log type="Warning">[DQC.US.0057.9728] One of the following elements CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents, CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations should appear as the opening and closing balance in the cash flow statement using the group http://www.grafacq.com/role/DisclosureRestatementOfPreviouslyIssuedFinancialStatementsStatementOfCashFlowsDetails. Instead the following balance items have been used in this statement . Due to the implementaion of ASU-2016-18 at least one of the opening and closing balance items listed must be used in the cash flow statement.  - </Log>
  </Logs>
  <InputFiles>
    <File doctype="S-4" original="gfor-20221231xs4.htm">gfor-20221231xs4.htm</File>
    <File>gfor-20221231.xsd</File>
    <File>gfor-20221231_cal.xml</File>
    <File>gfor-20221231_def.xml</File>
    <File>gfor-20221231_lab.xml</File>
    <File>gfor-20221231_pre.xml</File>
    <File>gfor-20221231xex23d1.htm</File>
    <File>gfor-20221231xex23d2.htm</File>
    <File>gfor-20221231xex99d2.htm</File>
    <File>gfor-20221231xex99d3.htm</File>
    <File>gfor-20221231xexfilingfees.htm</File>
  </InputFiles>
  <SupplementalFiles>
    <File>gfor-20221231xs4006.jpg</File>
    <File>gfor-20221231xs4007.jpg</File>
    <File>gfor-20221231xs4008.jpg</File>
    <File>gfor-20221231xs4018.jpg</File>
    <File>gfor-20221231xs4019.jpg</File>
    <File>gfor-20221231xs4020.jpg</File>
    <File>gfor-20221231xs4021.jpg</File>
    <File>gfor-20221231xs4022.jpg</File>
    <File>gfor-20221231xs4023.jpg</File>
    <File>gfor-20221231xs4024.jpg</File>
    <File>gfor-20221231xs4025.jpg</File>
    <File>gfor-20221231xs4026.jpg</File>
    <File>gfor-20221231xs4027.jpg</File>
    <File>gfor-20221231xs4028.jpg</File>
    <File>gfor-20221231xs4029.jpg</File>
    <File>gfor-20221231xs4030.jpg</File>
    <File>gfor-20221231xs4031.jpg</File>
    <File>gfor-20221231xs4032.jpg</File>
    <File>gfor-20221231xs4033.jpg</File>
    <File>gfor-20221231xs4034.jpg</File>
    <File>gfor-20221231xs4035.jpg</File>
    <File>gfor-20221231xs4036.jpg</File>
    <File>gfor-20221231xs4037.jpg</File>
    <File>gfor-20221231xs4038.jpg</File>
    <File>gfor-20221231xs4039.jpg</File>
    <File>gfor-20221231xs4040.jpg</File>
    <File>gfor-20221231xs4041.jpg</File>
    <File>gfor-20221231xs4042.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="2">http://fasb.org/srt/2022</BaseTaxonomy>
    <BaseTaxonomy items="413">http://fasb.org/us-gaap/2022</BaseTaxonomy>
    <BaseTaxonomy items="8">http://xbrl.sec.gov/dei/2022</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
