Fix intern graph request override return
Reviewed By: passy, lblasa Differential Revision: D49538074 fbshipit-source-id: bab45624f8115ca5df38510d3c4330fbe2ec7550
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fcd21111a0
commit
bb35c7cbb9
@@ -7,7 +7,7 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {GraphFileUpload, User} from 'flipper-common';
|
import {GraphFileUpload, GraphResponse, User} from 'flipper-common';
|
||||||
import {Atom, createState} from 'flipper-plugin';
|
import {Atom, createState} from 'flipper-plugin';
|
||||||
|
|
||||||
export async function fetchUser(): Promise<User | null> {
|
export async function fetchUser(): Promise<User | null> {
|
||||||
@@ -36,6 +36,20 @@ export async function internGraphPOSTAPIRequest(
|
|||||||
throw new Error('Feature not implemented');
|
throw new Error('Feature not implemented');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function internGraphPOSTAPIRequestRaw(
|
||||||
|
_endpoint: string,
|
||||||
|
_formFields: {
|
||||||
|
[key: string]: any;
|
||||||
|
} = {},
|
||||||
|
_fileFields: Record<string, GraphFileUpload> = {},
|
||||||
|
_options: {
|
||||||
|
timeout?: number;
|
||||||
|
internGraphUrl?: string;
|
||||||
|
} = {},
|
||||||
|
): Promise<GraphResponse> {
|
||||||
|
throw new Error('Feature not implemented');
|
||||||
|
}
|
||||||
|
|
||||||
export async function internGraphGETAPIRequest(
|
export async function internGraphGETAPIRequest(
|
||||||
_endpoint: string,
|
_endpoint: string,
|
||||||
_params: {
|
_params: {
|
||||||
@@ -49,6 +63,19 @@ export async function internGraphGETAPIRequest(
|
|||||||
throw new Error('Feature not implemented');
|
throw new Error('Feature not implemented');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function internGraphGETAPIRequestRaw(
|
||||||
|
_endpoint: string,
|
||||||
|
_params: {
|
||||||
|
[key: string]: any;
|
||||||
|
} = {},
|
||||||
|
_options: {
|
||||||
|
timeout?: number;
|
||||||
|
internGraphUrl?: string;
|
||||||
|
} = {},
|
||||||
|
): Promise<GraphResponse> {
|
||||||
|
throw new Error('Feature not implemented');
|
||||||
|
}
|
||||||
|
|
||||||
export async function graphQLQuery(_query: string): Promise<any> {
|
export async function graphQLQuery(_query: string): Promise<any> {
|
||||||
throw new Error('Feature not implemented');
|
throw new Error('Feature not implemented');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import {RenderHost} from 'flipper-frontend-core';
|
|||||||
import {setMenuEntries} from '../../reducers/connections';
|
import {setMenuEntries} from '../../reducers/connections';
|
||||||
import {
|
import {
|
||||||
currentUser,
|
currentUser,
|
||||||
internGraphGETAPIRequest,
|
internGraphGETAPIRequestRaw,
|
||||||
internGraphPOSTAPIRequest,
|
internGraphPOSTAPIRequestRaw,
|
||||||
isConnected,
|
isConnected,
|
||||||
} from '../../fb-stubs/user';
|
} from '../../fb-stubs/user';
|
||||||
|
|
||||||
@@ -34,8 +34,8 @@ export function initializeFlipperLibImplementation(
|
|||||||
...base,
|
...base,
|
||||||
intern: {
|
intern: {
|
||||||
...base.intern,
|
...base.intern,
|
||||||
graphGet: internGraphGETAPIRequest,
|
graphGet: internGraphGETAPIRequestRaw,
|
||||||
graphPost: internGraphPOSTAPIRequest,
|
graphPost: internGraphPOSTAPIRequestRaw,
|
||||||
currentUser,
|
currentUser,
|
||||||
isConnected,
|
isConnected,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user